diff --git a/changes.md b/changes.md index 7bb47ed89e..9ddeb16fa8 100644 --- a/changes.md +++ b/changes.md @@ -1,46 +1,10 @@ **Api changes**
-Added Property(s) - -- added property `approvalRuleMode` to type `BusinessUnit` -- added property `approvalRuleMode` to type `BusinessUnitDraft` -- added property `approvalRuleMode` to type `Company` -- added property `approvalRuleMode` to type `CompanyDraft` -- added property `approvalRuleMode` to type `Division` -- added property `approvalRuleMode` to type `DivisionDraft` -- added property `metaTitle` to type `ProductTailoringCreatedMessage` -- added property `metaDescription` to type `ProductTailoringCreatedMessage` -- added property `metaKeywords` to type `ProductTailoringCreatedMessage` -- added property `variants` to type `ProductTailoringCreatedMessage` -- added property `metaTitle` to type `ProductTailoringCreatedMessagePayload` -- added property `metaDescription` to type `ProductTailoringCreatedMessagePayload` -- added property `metaKeywords` to type `ProductTailoringCreatedMessagePayload` -- added property `variants` to type `ProductTailoringCreatedMessagePayload` -- added property `variants` to type `ProductTailoringData` -- added property `variants` to type `ProductTailoringDraft` -- added property `variants` to type `ProductTailoringInStoreDraft` -- added property `store` to type `StagedQuote` -
- - -
-Added Resource(s) +Added Enum(s) -- added resource `/{projectKey}/customers/search` -- added resource `/{projectKey}/customers/search/indexing-status` -- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests` -- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes` -- added resource `/{projectKey}/in-store/key={storeKey}/quotes` -- added resource `/{projectKey}/in-store/key={storeKey}/orders/quotes` -- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring/images` -- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring/images` -- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/key={key}` -- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/{ID}` -- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/key={key}` -- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/{ID}` -- added resource `/{projectKey}/in-store/key={storeKey}/quotes/key={key}` -- added resource `/{projectKey}/in-store/key={storeKey}/quotes/{ID}` +- added enum `attribute-group` to type `ChangeSubscriptionResourceTypeId` +- added enum `product-tailoring` to type `ChangeSubscriptionResourceTypeId`
@@ -51,14 +15,6 @@ -
-Added Enum(s) - -- added enum `attribute-group` to type `ChangeSubscriptionResourceTypeId` -- added enum `product-tailoring` to type `ChangeSubscriptionResourceTypeId` -
- -
Added Method(s) @@ -104,6 +60,30 @@
+
+Added Property(s) + +- added property `approvalRuleMode` to type `BusinessUnit` +- added property `approvalRuleMode` to type `BusinessUnitDraft` +- added property `approvalRuleMode` to type `Company` +- added property `approvalRuleMode` to type `CompanyDraft` +- added property `approvalRuleMode` to type `Division` +- added property `approvalRuleMode` to type `DivisionDraft` +- added property `metaTitle` to type `ProductTailoringCreatedMessage` +- added property `metaDescription` to type `ProductTailoringCreatedMessage` +- added property `metaKeywords` to type `ProductTailoringCreatedMessage` +- added property `variants` to type `ProductTailoringCreatedMessage` +- added property `metaTitle` to type `ProductTailoringCreatedMessagePayload` +- added property `metaDescription` to type `ProductTailoringCreatedMessagePayload` +- added property `metaKeywords` to type `ProductTailoringCreatedMessagePayload` +- added property `variants` to type `ProductTailoringCreatedMessagePayload` +- added property `variants` to type `ProductTailoringData` +- added property `variants` to type `ProductTailoringDraft` +- added property `variants` to type `ProductTailoringInStoreDraft` +- added property `store` to type `StagedQuote` +
+ +
Added Type(s) @@ -116,11 +96,21 @@ - added type `CustomerSearchRequest` - added type `CustomerSearchResult` - added type `BusinessUnitApprovalRuleModeChangedMessage` +- added type `ProductPriceCustomFieldAddedMessage` +- added type `ProductPriceCustomFieldChangedMessage` +- added type `ProductPriceCustomFieldRemovedMessage` +- added type `ProductPriceCustomFieldsRemovedMessage` +- added type `ProductPriceCustomFieldsSetMessage` - added type `ProductTailoringImageAddedMessage` - added type `ProductTailoringImagesSetMessage` - added type `ProductVariantTailoringAddedMessage` - added type `ProductVariantTailoringRemovedMessage` - added type `BusinessUnitApprovalRuleModeChangedMessagePayload` +- added type `ProductPriceCustomFieldAddedMessagePayload` +- added type `ProductPriceCustomFieldChangedMessagePayload` +- added type `ProductPriceCustomFieldRemovedMessagePayload` +- added type `ProductPriceCustomFieldsRemovedMessagePayload` +- added type `ProductPriceCustomFieldsSetMessagePayload` - added type `ProductTailoringImageAddedMessagePayload` - added type `ProductTailoringImagesSetMessagePayload` - added type `ProductVariantTailoringAddedMessagePayload` @@ -162,3 +152,23 @@ - :warning: removed query parameter `localeProjection` from method `delete /{projectKey}/products/{ID}`
+ +
+Added Resource(s) + +- added resource `/{projectKey}/customers/search` +- added resource `/{projectKey}/customers/search/indexing-status` +- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests` +- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes` +- added resource `/{projectKey}/in-store/key={storeKey}/quotes` +- added resource `/{projectKey}/in-store/key={storeKey}/orders/quotes` +- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring/images` +- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring/images` +- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/key={key}` +- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/{ID}` +- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/key={key}` +- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/{ID}` +- added resource `/{projectKey}/in-store/key={storeKey}/quotes/key={key}` +- added resource `/{projectKey}/in-store/key={storeKey}/quotes/{ID}` +
+ diff --git a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls index f52815c7c9..e1ed42402a 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -7828,6 +7828,48 @@ type ProductPriceChanged implements MessagePayload { type: String! } +type ProductPriceCustomFieldAdded implements MessagePayload { + priceId: String! + variantId: Int! + staged: Boolean! + name: String! + value: Json! + type: String! +} + +type ProductPriceCustomFieldChanged implements MessagePayload { + priceId: String! + variantId: Int! + staged: Boolean! + name: String! + value: Json! + type: String! +} + +type ProductPriceCustomFieldRemoved implements MessagePayload { + priceId: String! + variantId: Int! + staged: Boolean! + name: String! + type: String! +} + +type ProductPriceCustomFieldsRemoved implements MessagePayload { + priceId: String! + variantId: Int! + staged: Boolean! + type: String! +} + +type ProductPriceCustomFieldsSet implements MessagePayload { + priceId: String! + variantId: Int! + staged: Boolean! + customField: CustomFieldsType! + oldTypeId: String + type: String! +} + input ProductPriceDataInput { value: BaseMoneyInput! key: String diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java index f88eaee1ed..a0c90afcdc 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java @@ -198,6 +198,11 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductImageAddedMessageImpl.class, name = ProductImageAddedMessage.PRODUCT_IMAGE_ADDED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceAddedMessageImpl.class, name = ProductPriceAddedMessage.PRODUCT_PRICE_ADDED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceChangedMessageImpl.class, name = ProductPriceChangedMessage.PRODUCT_PRICE_CHANGED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessageImpl.class, name = ProductPriceCustomFieldAddedMessage.PRODUCT_PRICE_CUSTOM_FIELD_ADDED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessageImpl.class, name = ProductPriceCustomFieldChangedMessage.PRODUCT_PRICE_CUSTOM_FIELD_CHANGED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessageImpl.class, name = ProductPriceCustomFieldRemovedMessage.PRODUCT_PRICE_CUSTOM_FIELD_REMOVED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessageImpl.class, name = ProductPriceCustomFieldsRemovedMessage.PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessageImpl.class, name = ProductPriceCustomFieldsSetMessage.PRODUCT_PRICE_CUSTOM_FIELDS_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceDiscountsSetMessageImpl.class, name = ProductPriceDiscountsSetMessage.PRODUCT_PRICE_DISCOUNTS_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceExternalDiscountSetMessageImpl.class, name = ProductPriceExternalDiscountSetMessage.PRODUCT_PRICE_EXTERNAL_DISCOUNT_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceKeySetMessageImpl.class, name = ProductPriceKeySetMessage.PRODUCT_PRICE_KEY_SET), @@ -897,6 +902,26 @@ public static Message deepCopy(@Nullable final Message template) { return com.commercetools.api.models.message.ProductPriceChangedMessage .deepCopy((com.commercetools.api.models.message.ProductPriceChangedMessage) template); } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessage) { + return com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessage + .deepCopy((com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessage) { + return com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessage + .deepCopy((com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessage) { + return com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessage + .deepCopy((com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessage) { + return com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessage + .deepCopy((com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessage) { + return com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessage + .deepCopy((com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessage) template); + } if (template instanceof com.commercetools.api.models.message.ProductPriceDiscountsSetMessage) { return com.commercetools.api.models.message.ProductPriceDiscountsSetMessage .deepCopy((com.commercetools.api.models.message.ProductPriceDiscountsSetMessage) template); @@ -2461,6 +2486,46 @@ public static com.commercetools.api.models.message.ProductPriceChangedMessageBui return com.commercetools.api.models.message.ProductPriceChangedMessageBuilder.of(); } + /** + * builder for productPriceCustomFieldAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessageBuilder productPriceCustomFieldAddedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessageBuilder.of(); + } + + /** + * builder for productPriceCustomFieldChanged subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessageBuilder productPriceCustomFieldChangedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessageBuilder.of(); + } + + /** + * builder for productPriceCustomFieldRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessageBuilder productPriceCustomFieldRemovedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessageBuilder.of(); + } + + /** + * builder for productPriceCustomFieldsRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessageBuilder productPriceCustomFieldsRemovedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessageBuilder.of(); + } + + /** + * builder for productPriceCustomFieldsSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessageBuilder productPriceCustomFieldsSetBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessageBuilder.of(); + } + /** * builder for productPriceDiscountsSet subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java index 28793e14b9..a8f0ff3c08 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java @@ -635,6 +635,26 @@ public com.commercetools.api.models.message.ProductPriceChangedMessageBuilder pr return com.commercetools.api.models.message.ProductPriceChangedMessageBuilder.of(); } + public com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessageBuilder productPriceCustomFieldAddedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessageBuilder productPriceCustomFieldChangedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessageBuilder productPriceCustomFieldRemovedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessageBuilder productPriceCustomFieldsRemovedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessageBuilder productPriceCustomFieldsSetBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessageBuilder.of(); + } + public com.commercetools.api.models.message.ProductPriceDiscountsSetMessageBuilder productPriceDiscountsSetBuilder() { return com.commercetools.api.models.message.ProductPriceDiscountsSetMessageBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java index 1019cef102..cac50b6162 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java @@ -185,6 +185,11 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductImageAddedMessagePayloadImpl.class, name = ProductImageAddedMessagePayload.PRODUCT_IMAGE_ADDED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceAddedMessagePayloadImpl.class, name = ProductPriceAddedMessagePayload.PRODUCT_PRICE_ADDED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceChangedMessagePayloadImpl.class, name = ProductPriceChangedMessagePayload.PRODUCT_PRICE_CHANGED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessagePayloadImpl.class, name = ProductPriceCustomFieldAddedMessagePayload.PRODUCT_PRICE_CUSTOM_FIELD_ADDED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessagePayloadImpl.class, name = ProductPriceCustomFieldChangedMessagePayload.PRODUCT_PRICE_CUSTOM_FIELD_CHANGED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessagePayloadImpl.class, name = ProductPriceCustomFieldRemovedMessagePayload.PRODUCT_PRICE_CUSTOM_FIELD_REMOVED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessagePayloadImpl.class, name = ProductPriceCustomFieldsRemovedMessagePayload.PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessagePayloadImpl.class, name = ProductPriceCustomFieldsSetMessagePayload.PRODUCT_PRICE_CUSTOM_FIELDS_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceDiscountsSetMessagePayloadImpl.class, name = ProductPriceDiscountsSetMessagePayload.PRODUCT_PRICE_DISCOUNTS_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceExternalDiscountSetMessagePayloadImpl.class, name = ProductPriceExternalDiscountSetMessagePayload.PRODUCT_PRICE_EXTERNAL_DISCOUNT_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductPriceKeySetMessagePayloadImpl.class, name = ProductPriceKeySetMessagePayload.PRODUCT_PRICE_KEY_SET), @@ -734,6 +739,26 @@ public static MessagePayload deepCopy(@Nullable final MessagePayload template) { return com.commercetools.api.models.message.ProductPriceChangedMessagePayload .deepCopy((com.commercetools.api.models.message.ProductPriceChangedMessagePayload) template); } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessagePayload) { + return com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessagePayload) { + return com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessagePayload) { + return com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessagePayload) { + return com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessagePayload) { + return com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessagePayload) template); + } if (template instanceof com.commercetools.api.models.message.ProductPriceDiscountsSetMessagePayload) { return com.commercetools.api.models.message.ProductPriceDiscountsSetMessagePayload .deepCopy((com.commercetools.api.models.message.ProductPriceDiscountsSetMessagePayload) template); @@ -2290,6 +2315,46 @@ public static com.commercetools.api.models.message.ProductPriceChangedMessagePay return com.commercetools.api.models.message.ProductPriceChangedMessagePayloadBuilder.of(); } + /** + * builder for productPriceCustomFieldAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessagePayloadBuilder productPriceCustomFieldAddedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessagePayloadBuilder.of(); + } + + /** + * builder for productPriceCustomFieldChanged subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessagePayloadBuilder productPriceCustomFieldChangedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessagePayloadBuilder.of(); + } + + /** + * builder for productPriceCustomFieldRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessagePayloadBuilder productPriceCustomFieldRemovedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessagePayloadBuilder.of(); + } + + /** + * builder for productPriceCustomFieldsRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessagePayloadBuilder productPriceCustomFieldsRemovedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessagePayloadBuilder.of(); + } + + /** + * builder for productPriceCustomFieldsSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessagePayloadBuilder productPriceCustomFieldsSetBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessagePayloadBuilder.of(); + } + /** * builder for productPriceDiscountsSet subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java index b62cf0fd04..1a07814778 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java @@ -635,6 +635,26 @@ public com.commercetools.api.models.message.ProductPriceChangedMessagePayloadBui return com.commercetools.api.models.message.ProductPriceChangedMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessagePayloadBuilder productPriceCustomFieldAddedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldAddedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessagePayloadBuilder productPriceCustomFieldChangedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldChangedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessagePayloadBuilder productPriceCustomFieldRemovedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldRemovedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessagePayloadBuilder productPriceCustomFieldsRemovedBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldsRemovedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessagePayloadBuilder productPriceCustomFieldsSetBuilder() { + return com.commercetools.api.models.message.ProductPriceCustomFieldsSetMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.ProductPriceDiscountsSetMessagePayloadBuilder productPriceDiscountsSetBuilder() { return com.commercetools.api.models.message.ProductPriceDiscountsSetMessagePayloadBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessage.java new file mode 100644 index 0000000000..954a0e7371 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessage.java @@ -0,0 +1,229 @@ + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after adding a Custom Field to a Price using the Set Price CustomField update action.

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

+ *     ProductPriceCustomFieldAddedMessage productPriceCustomFieldAddedMessage = ProductPriceCustomFieldAddedMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldAddedMessageImpl.class) +public interface ProductPriceCustomFieldAddedMessage extends Message { + + /** + * discriminator value for ProductPriceCustomFieldAddedMessage + */ + String PRODUCT_PRICE_CUSTOM_FIELD_ADDED = "ProductPriceCustomFieldAdded"; + + /** + *

Unique identifier of the Price to which the Custom Field was added.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Name of the Custom Field that was added.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

The added CustomFieldValue based on the FieldType.

+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

Unique identifier of the Price to which the Custom Field was added.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *

Name of the Custom Field that was added.

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

The added CustomFieldValue based on the FieldType.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductPriceCustomFieldAddedMessage + */ + public static ProductPriceCustomFieldAddedMessage of() { + return new ProductPriceCustomFieldAddedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldAddedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldAddedMessage of(final ProductPriceCustomFieldAddedMessage template) { + ProductPriceCustomFieldAddedMessageImpl instance = new ProductPriceCustomFieldAddedMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldAddedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldAddedMessage deepCopy( + @Nullable final ProductPriceCustomFieldAddedMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldAddedMessageImpl instance = new ProductPriceCustomFieldAddedMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldAddedMessage + * @return builder + */ + public static ProductPriceCustomFieldAddedMessageBuilder builder() { + return ProductPriceCustomFieldAddedMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessageBuilder builder( + final ProductPriceCustomFieldAddedMessage template) { + return ProductPriceCustomFieldAddedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldAddedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageBuilder.java new file mode 100644 index 0000000000..ab70f38232 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageBuilder.java @@ -0,0 +1,532 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldAddedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldAddedMessage productPriceCustomFieldAddedMessage = ProductPriceCustomFieldAddedMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldAddedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

+ * @param version value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder 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.

+ * @param sequenceNumber value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder 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 ProductPriceCustomFieldAddedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder 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.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Unique identifier of the Price to which the Custom Field was added.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Name of the Custom Field that was added.

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

The added CustomFieldValue based on the FieldType.

+ * @param value value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessageBuilder value(final java.lang.Object value) { + this.value = value; + 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.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price to which the Custom Field was added.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was added.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

The added CustomFieldValue based on the FieldType.

+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductPriceCustomFieldAddedMessage with checking for non-null required values + * @return ProductPriceCustomFieldAddedMessage + */ + public ProductPriceCustomFieldAddedMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldAddedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldAddedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldAddedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldAddedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldAddedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldAddedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldAddedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldAddedMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldAddedMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldAddedMessage.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldAddedMessage.class + ": name is missing"); + Objects.requireNonNull(value, ProductPriceCustomFieldAddedMessage.class + ": value is missing"); + return new ProductPriceCustomFieldAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name, value); + } + + /** + * builds ProductPriceCustomFieldAddedMessage without checking for non-null required values + * @return ProductPriceCustomFieldAddedMessage + */ + public ProductPriceCustomFieldAddedMessage buildUnchecked() { + return new ProductPriceCustomFieldAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name, value); + } + + /** + * factory method for an instance of ProductPriceCustomFieldAddedMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessageBuilder of() { + return new ProductPriceCustomFieldAddedMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessageBuilder of(final ProductPriceCustomFieldAddedMessage template) { + ProductPriceCustomFieldAddedMessageBuilder builder = new ProductPriceCustomFieldAddedMessageBuilder(); + 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.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageImpl.java new file mode 100644 index 0000000000..130a2aea31 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageImpl.java @@ -0,0 +1,375 @@ + +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 adding a Custom Field to a Price using the Set Price CustomField update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldAddedMessageImpl implements ProductPriceCustomFieldAddedMessage, 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 priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldAddedMessageImpl(@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("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged, @JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value) { + 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.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.value = value; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_ADDED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldAddedMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_ADDED; + } + + /** + *

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.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price to which the Custom Field was added.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was added.

+ */ + + public String getName() { + return this.name; + } + + /** + *

The added CustomFieldValue based on the FieldType.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + 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 setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldAddedMessageImpl that = (ProductPriceCustomFieldAddedMessageImpl) 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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .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(priceId) + .append(variantId) + .append(staged) + .append(name) + .append(value) + .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("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayload.java new file mode 100644 index 0000000000..85caba4e70 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayload.java @@ -0,0 +1,202 @@ + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after adding a Custom Field to a Price using the Set Price CustomField update action.

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

+ *     ProductPriceCustomFieldAddedMessagePayload productPriceCustomFieldAddedMessagePayload = ProductPriceCustomFieldAddedMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldAddedMessagePayloadImpl.class) +public interface ProductPriceCustomFieldAddedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductPriceCustomFieldAddedMessagePayload + */ + String PRODUCT_PRICE_CUSTOM_FIELD_ADDED = "ProductPriceCustomFieldAdded"; + + /** + *

Unique identifier of the Price to which the Custom Field was added.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Name of the Custom Field that was added.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

The added CustomFieldValue based on the FieldType.

+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

Unique identifier of the Price to which the Custom Field was added.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *

Name of the Custom Field that was added.

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

The added CustomFieldValue based on the FieldType.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductPriceCustomFieldAddedMessagePayload + */ + public static ProductPriceCustomFieldAddedMessagePayload of() { + return new ProductPriceCustomFieldAddedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldAddedMessagePayload of( + final ProductPriceCustomFieldAddedMessagePayload template) { + ProductPriceCustomFieldAddedMessagePayloadImpl instance = new ProductPriceCustomFieldAddedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldAddedMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldAddedMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldAddedMessagePayloadImpl instance = new ProductPriceCustomFieldAddedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldAddedMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldAddedMessagePayloadBuilder builder() { + return ProductPriceCustomFieldAddedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessagePayloadBuilder builder( + final ProductPriceCustomFieldAddedMessagePayload template) { + return ProductPriceCustomFieldAddedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldAddedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadBuilder.java new file mode 100644 index 0000000000..85966e9561 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadBuilder.java @@ -0,0 +1,183 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldAddedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldAddedMessagePayload productPriceCustomFieldAddedMessagePayload = ProductPriceCustomFieldAddedMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldAddedMessagePayloadBuilder + implements Builder { + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + *

Unique identifier of the Price to which the Custom Field was added.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Name of the Custom Field that was added.

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

The added CustomFieldValue based on the FieldType.

+ * @param value value to be set + * @return Builder + */ + + public ProductPriceCustomFieldAddedMessagePayloadBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

Unique identifier of the Price to which the Custom Field was added.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was added.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

The added CustomFieldValue based on the FieldType.

+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductPriceCustomFieldAddedMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldAddedMessagePayload + */ + public ProductPriceCustomFieldAddedMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldAddedMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldAddedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldAddedMessagePayload.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldAddedMessagePayload.class + ": name is missing"); + Objects.requireNonNull(value, ProductPriceCustomFieldAddedMessagePayload.class + ": value is missing"); + return new ProductPriceCustomFieldAddedMessagePayloadImpl(priceId, variantId, staged, name, value); + } + + /** + * builds ProductPriceCustomFieldAddedMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldAddedMessagePayload + */ + public ProductPriceCustomFieldAddedMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldAddedMessagePayloadImpl(priceId, variantId, staged, name, value); + } + + /** + * factory method for an instance of ProductPriceCustomFieldAddedMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessagePayloadBuilder of() { + return new ProductPriceCustomFieldAddedMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldAddedMessagePayloadBuilder of( + final ProductPriceCustomFieldAddedMessagePayload template) { + ProductPriceCustomFieldAddedMessagePayloadBuilder builder = new ProductPriceCustomFieldAddedMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadImpl.java new file mode 100644 index 0000000000..1894579b2e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadImpl.java @@ -0,0 +1,175 @@ + +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 adding a Custom Field to a Price using the Set Price CustomField update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldAddedMessagePayloadImpl + implements ProductPriceCustomFieldAddedMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldAddedMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged, + @JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.value = value; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_ADDED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldAddedMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_ADDED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

Unique identifier of the Price to which the Custom Field was added.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was added.

+ */ + + public String getName() { + return this.name; + } + + /** + *

The added CustomFieldValue based on the FieldType.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldAddedMessagePayloadImpl that = (ProductPriceCustomFieldAddedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .append(value) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessage.java new file mode 100644 index 0000000000..fc711b67ea --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessage.java @@ -0,0 +1,229 @@ + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after changing an existing Custom Field on a Price using the Set Price CustomField update action.

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

+ *     ProductPriceCustomFieldChangedMessage productPriceCustomFieldChangedMessage = ProductPriceCustomFieldChangedMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldChangedMessageImpl.class) +public interface ProductPriceCustomFieldChangedMessage extends Message { + + /** + * discriminator value for ProductPriceCustomFieldChangedMessage + */ + String PRODUCT_PRICE_CUSTOM_FIELD_CHANGED = "ProductPriceCustomFieldChanged"; + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Name of the Custom Field that was changed.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *

Name of the Custom Field that was changed.

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

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductPriceCustomFieldChangedMessage + */ + public static ProductPriceCustomFieldChangedMessage of() { + return new ProductPriceCustomFieldChangedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldChangedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldChangedMessage of(final ProductPriceCustomFieldChangedMessage template) { + ProductPriceCustomFieldChangedMessageImpl instance = new ProductPriceCustomFieldChangedMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldChangedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldChangedMessage deepCopy( + @Nullable final ProductPriceCustomFieldChangedMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldChangedMessageImpl instance = new ProductPriceCustomFieldChangedMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldChangedMessage + * @return builder + */ + public static ProductPriceCustomFieldChangedMessageBuilder builder() { + return ProductPriceCustomFieldChangedMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldChangedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessageBuilder builder( + final ProductPriceCustomFieldChangedMessage template) { + return ProductPriceCustomFieldChangedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldChangedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageBuilder.java new file mode 100644 index 0000000000..e491c6ec19 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageBuilder.java @@ -0,0 +1,533 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldChangedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldChangedMessage productPriceCustomFieldChangedMessage = ProductPriceCustomFieldChangedMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldChangedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

+ * @param version value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder 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.

+ * @param sequenceNumber value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder 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 ProductPriceCustomFieldChangedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder 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.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Name of the Custom Field that was changed.

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

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ * @param value value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessageBuilder value(final java.lang.Object value) { + this.value = value; + 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.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was changed.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductPriceCustomFieldChangedMessage with checking for non-null required values + * @return ProductPriceCustomFieldChangedMessage + */ + public ProductPriceCustomFieldChangedMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldChangedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldChangedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldChangedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldChangedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldChangedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldChangedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldChangedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldChangedMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldChangedMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldChangedMessage.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldChangedMessage.class + ": name is missing"); + Objects.requireNonNull(value, ProductPriceCustomFieldChangedMessage.class + ": value is missing"); + return new ProductPriceCustomFieldChangedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name, value); + } + + /** + * builds ProductPriceCustomFieldChangedMessage without checking for non-null required values + * @return ProductPriceCustomFieldChangedMessage + */ + public ProductPriceCustomFieldChangedMessage buildUnchecked() { + return new ProductPriceCustomFieldChangedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name, value); + } + + /** + * factory method for an instance of ProductPriceCustomFieldChangedMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessageBuilder of() { + return new ProductPriceCustomFieldChangedMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldChangedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessageBuilder of( + final ProductPriceCustomFieldChangedMessage template) { + ProductPriceCustomFieldChangedMessageBuilder builder = new ProductPriceCustomFieldChangedMessageBuilder(); + 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.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageImpl.java new file mode 100644 index 0000000000..a0471ff52c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageImpl.java @@ -0,0 +1,375 @@ + +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 changing an existing Custom Field on a Price using the Set Price CustomField update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldChangedMessageImpl implements ProductPriceCustomFieldChangedMessage, 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 priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldChangedMessageImpl(@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("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged, @JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value) { + 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.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.value = value; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_CHANGED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldChangedMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_CHANGED; + } + + /** + *

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.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was changed.

+ */ + + public String getName() { + return this.name; + } + + /** + *

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + 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 setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldChangedMessageImpl that = (ProductPriceCustomFieldChangedMessageImpl) 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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .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(priceId) + .append(variantId) + .append(staged) + .append(name) + .append(value) + .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("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayload.java new file mode 100644 index 0000000000..d6042574f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayload.java @@ -0,0 +1,202 @@ + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after changing an existing Custom Field on a Price using the Set Price CustomField update action.

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

+ *     ProductPriceCustomFieldChangedMessagePayload productPriceCustomFieldChangedMessagePayload = ProductPriceCustomFieldChangedMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldChangedMessagePayloadImpl.class) +public interface ProductPriceCustomFieldChangedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductPriceCustomFieldChangedMessagePayload + */ + String PRODUCT_PRICE_CUSTOM_FIELD_CHANGED = "ProductPriceCustomFieldChanged"; + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Name of the Custom Field that was changed.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *

Name of the Custom Field that was changed.

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

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductPriceCustomFieldChangedMessagePayload + */ + public static ProductPriceCustomFieldChangedMessagePayload of() { + return new ProductPriceCustomFieldChangedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldChangedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldChangedMessagePayload of( + final ProductPriceCustomFieldChangedMessagePayload template) { + ProductPriceCustomFieldChangedMessagePayloadImpl instance = new ProductPriceCustomFieldChangedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldChangedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldChangedMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldChangedMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldChangedMessagePayloadImpl instance = new ProductPriceCustomFieldChangedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldChangedMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldChangedMessagePayloadBuilder builder() { + return ProductPriceCustomFieldChangedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldChangedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessagePayloadBuilder builder( + final ProductPriceCustomFieldChangedMessagePayload template) { + return ProductPriceCustomFieldChangedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldChangedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadBuilder.java new file mode 100644 index 0000000000..3fffac35e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadBuilder.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldChangedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldChangedMessagePayload productPriceCustomFieldChangedMessagePayload = ProductPriceCustomFieldChangedMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldChangedMessagePayloadBuilder + implements Builder { + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Name of the Custom Field that was changed.

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

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ * @param value value to be set + * @return Builder + */ + + public ProductPriceCustomFieldChangedMessagePayloadBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was changed.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductPriceCustomFieldChangedMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldChangedMessagePayload + */ + public ProductPriceCustomFieldChangedMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldChangedMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, + ProductPriceCustomFieldChangedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldChangedMessagePayload.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldChangedMessagePayload.class + ": name is missing"); + Objects.requireNonNull(value, ProductPriceCustomFieldChangedMessagePayload.class + ": value is missing"); + return new ProductPriceCustomFieldChangedMessagePayloadImpl(priceId, variantId, staged, name, value); + } + + /** + * builds ProductPriceCustomFieldChangedMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldChangedMessagePayload + */ + public ProductPriceCustomFieldChangedMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldChangedMessagePayloadImpl(priceId, variantId, staged, name, value); + } + + /** + * factory method for an instance of ProductPriceCustomFieldChangedMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessagePayloadBuilder of() { + return new ProductPriceCustomFieldChangedMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldChangedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldChangedMessagePayloadBuilder of( + final ProductPriceCustomFieldChangedMessagePayload template) { + ProductPriceCustomFieldChangedMessagePayloadBuilder builder = new ProductPriceCustomFieldChangedMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadImpl.java new file mode 100644 index 0000000000..063c4abe79 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadImpl.java @@ -0,0 +1,175 @@ + +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 changing an existing Custom Field on a Price using the Set Price CustomField update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldChangedMessagePayloadImpl + implements ProductPriceCustomFieldChangedMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldChangedMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged, + @JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.value = value; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_CHANGED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldChangedMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_CHANGED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

Unique identifier of the Price of which the Custom Field was changed.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was changed.

+ */ + + public String getName() { + return this.name; + } + + /** + *

CustomFieldValue based on the FieldType after the Set Price CustomField update action.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldChangedMessagePayloadImpl that = (ProductPriceCustomFieldChangedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .append(value) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessage.java new file mode 100644 index 0000000000..5cbb226563 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessage.java @@ -0,0 +1,212 @@ + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after removing a Custom Field from a Price using the Set Price CustomField update action.

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

+ *     ProductPriceCustomFieldRemovedMessage productPriceCustomFieldRemovedMessage = ProductPriceCustomFieldRemovedMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldRemovedMessageImpl.class) +public interface ProductPriceCustomFieldRemovedMessage extends Message { + + /** + * discriminator value for ProductPriceCustomFieldRemovedMessage + */ + String PRODUCT_PRICE_CUSTOM_FIELD_REMOVED = "ProductPriceCustomFieldRemoved"; + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Name of the Custom Field that was removed.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *

Name of the Custom Field that was removed.

+ * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of ProductPriceCustomFieldRemovedMessage + */ + public static ProductPriceCustomFieldRemovedMessage of() { + return new ProductPriceCustomFieldRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldRemovedMessage of(final ProductPriceCustomFieldRemovedMessage template) { + ProductPriceCustomFieldRemovedMessageImpl instance = new ProductPriceCustomFieldRemovedMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldRemovedMessage deepCopy( + @Nullable final ProductPriceCustomFieldRemovedMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldRemovedMessageImpl instance = new ProductPriceCustomFieldRemovedMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldRemovedMessage + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessageBuilder builder() { + return ProductPriceCustomFieldRemovedMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessageBuilder builder( + final ProductPriceCustomFieldRemovedMessage template) { + return ProductPriceCustomFieldRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldRemovedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageBuilder.java new file mode 100644 index 0000000000..52ff7ba691 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageBuilder.java @@ -0,0 +1,509 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldRemovedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldRemovedMessage productPriceCustomFieldRemovedMessage = ProductPriceCustomFieldRemovedMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldRemovedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

+ * @param version value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder 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.

+ * @param sequenceNumber value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder 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 ProductPriceCustomFieldRemovedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder 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.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Name of the Custom Field that was removed.

+ * @param name value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessageBuilder name(final String name) { + this.name = name; + 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.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was removed.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds ProductPriceCustomFieldRemovedMessage with checking for non-null required values + * @return ProductPriceCustomFieldRemovedMessage + */ + public ProductPriceCustomFieldRemovedMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldRemovedMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldRemovedMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldRemovedMessage.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldRemovedMessage.class + ": name is missing"); + return new ProductPriceCustomFieldRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name); + } + + /** + * builds ProductPriceCustomFieldRemovedMessage without checking for non-null required values + * @return ProductPriceCustomFieldRemovedMessage + */ + public ProductPriceCustomFieldRemovedMessage buildUnchecked() { + return new ProductPriceCustomFieldRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, name); + } + + /** + * factory method for an instance of ProductPriceCustomFieldRemovedMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessageBuilder of() { + return new ProductPriceCustomFieldRemovedMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessageBuilder of( + final ProductPriceCustomFieldRemovedMessage template) { + ProductPriceCustomFieldRemovedMessageBuilder builder = new ProductPriceCustomFieldRemovedMessageBuilder(); + 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.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageImpl.java new file mode 100644 index 0000000000..a9fe19cb2c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageImpl.java @@ -0,0 +1,355 @@ + +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 removing a Custom Field from a Price using the Set Price CustomField update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldRemovedMessageImpl implements ProductPriceCustomFieldRemovedMessage, 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 priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldRemovedMessageImpl(@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("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged, @JsonProperty("name") final String name) { + 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.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_REMOVED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldRemovedMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_REMOVED; + } + + /** + *

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.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was removed.

+ */ + + public String getName() { + return this.name; + } + + 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 setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setName(final String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldRemovedMessageImpl that = (ProductPriceCustomFieldRemovedMessageImpl) 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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .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(priceId) + .append(variantId) + .append(staged) + .append(name) + .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("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayload.java new file mode 100644 index 0000000000..ec29aebaaa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayload.java @@ -0,0 +1,185 @@ + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after removing a Custom Field from a Price using the Set Price CustomField update action.

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

+ *     ProductPriceCustomFieldRemovedMessagePayload productPriceCustomFieldRemovedMessagePayload = ProductPriceCustomFieldRemovedMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldRemovedMessagePayloadImpl.class) +public interface ProductPriceCustomFieldRemovedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductPriceCustomFieldRemovedMessagePayload + */ + String PRODUCT_PRICE_CUSTOM_FIELD_REMOVED = "ProductPriceCustomFieldRemoved"; + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Name of the Custom Field that was removed.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *

Name of the Custom Field that was removed.

+ * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of ProductPriceCustomFieldRemovedMessagePayload + */ + public static ProductPriceCustomFieldRemovedMessagePayload of() { + return new ProductPriceCustomFieldRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldRemovedMessagePayload of( + final ProductPriceCustomFieldRemovedMessagePayload template) { + ProductPriceCustomFieldRemovedMessagePayloadImpl instance = new ProductPriceCustomFieldRemovedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldRemovedMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldRemovedMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldRemovedMessagePayloadImpl instance = new ProductPriceCustomFieldRemovedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldRemovedMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessagePayloadBuilder builder() { + return ProductPriceCustomFieldRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessagePayloadBuilder builder( + final ProductPriceCustomFieldRemovedMessagePayload template) { + return ProductPriceCustomFieldRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldRemovedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadBuilder.java new file mode 100644 index 0000000000..8d96cd4233 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadBuilder.java @@ -0,0 +1,160 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldRemovedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldRemovedMessagePayload productPriceCustomFieldRemovedMessagePayload = ProductPriceCustomFieldRemovedMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldRemovedMessagePayloadBuilder + implements Builder { + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldRemovedMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Name of the Custom Field that was removed.

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

Unique identifier of the Price from which the Custom Field was removed.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was removed.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds ProductPriceCustomFieldRemovedMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldRemovedMessagePayload + */ + public ProductPriceCustomFieldRemovedMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldRemovedMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, + ProductPriceCustomFieldRemovedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldRemovedMessagePayload.class + ": staged is missing"); + Objects.requireNonNull(name, ProductPriceCustomFieldRemovedMessagePayload.class + ": name is missing"); + return new ProductPriceCustomFieldRemovedMessagePayloadImpl(priceId, variantId, staged, name); + } + + /** + * builds ProductPriceCustomFieldRemovedMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldRemovedMessagePayload + */ + public ProductPriceCustomFieldRemovedMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldRemovedMessagePayloadImpl(priceId, variantId, staged, name); + } + + /** + * factory method for an instance of ProductPriceCustomFieldRemovedMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessagePayloadBuilder of() { + return new ProductPriceCustomFieldRemovedMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldRemovedMessagePayloadBuilder of( + final ProductPriceCustomFieldRemovedMessagePayload template) { + ProductPriceCustomFieldRemovedMessagePayloadBuilder builder = new ProductPriceCustomFieldRemovedMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadImpl.java new file mode 100644 index 0000000000..fd8d48b0a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadImpl.java @@ -0,0 +1,156 @@ + +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 removing a Custom Field from a Price using the Set Price CustomField update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldRemovedMessagePayloadImpl + implements ProductPriceCustomFieldRemovedMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldRemovedMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged, + @JsonProperty("name") final String name) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.name = name; + this.type = PRODUCT_PRICE_CUSTOM_FIELD_REMOVED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldRemovedMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELD_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

Unique identifier of the Price from which the Custom Field was removed.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Name of the Custom Field that was removed.

+ */ + + public String getName() { + return this.name; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setName(final String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldRemovedMessagePayloadImpl that = (ProductPriceCustomFieldRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(priceId) + .append(variantId) + .append(staged) + .append(name) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("name", name) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessage.java new file mode 100644 index 0000000000..2e6e0ca70e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessage.java @@ -0,0 +1,195 @@ + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after removing a Custom Type from a Price using the Set Price Custom Type update action.

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

+ *     ProductPriceCustomFieldsRemovedMessage productPriceCustomFieldsRemovedMessage = ProductPriceCustomFieldsRemovedMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldsRemovedMessageImpl.class) +public interface ProductPriceCustomFieldsRemovedMessage extends Message { + + /** + * discriminator value for ProductPriceCustomFieldsRemovedMessage + */ + String PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED = "ProductPriceCustomFieldsRemoved"; + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductPriceCustomFieldsRemovedMessage + */ + public static ProductPriceCustomFieldsRemovedMessage of() { + return new ProductPriceCustomFieldsRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldsRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldsRemovedMessage of(final ProductPriceCustomFieldsRemovedMessage template) { + ProductPriceCustomFieldsRemovedMessageImpl instance = new ProductPriceCustomFieldsRemovedMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldsRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldsRemovedMessage deepCopy( + @Nullable final ProductPriceCustomFieldsRemovedMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldsRemovedMessageImpl instance = new ProductPriceCustomFieldsRemovedMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldsRemovedMessage + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessageBuilder builder() { + return ProductPriceCustomFieldsRemovedMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldsRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessageBuilder builder( + final ProductPriceCustomFieldsRemovedMessage template) { + return ProductPriceCustomFieldsRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldsRemovedMessage( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageBuilder.java new file mode 100644 index 0000000000..07fddfb058 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageBuilder.java @@ -0,0 +1,484 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldsRemovedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldsRemovedMessage productPriceCustomFieldsRemovedMessage = ProductPriceCustomFieldsRemovedMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsRemovedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

+ * @param version value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder 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.

+ * @param sequenceNumber value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder 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 ProductPriceCustomFieldsRemovedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder 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.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessageBuilder staged(final Boolean staged) { + this.staged = staged; + 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.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductPriceCustomFieldsRemovedMessage with checking for non-null required values + * @return ProductPriceCustomFieldsRemovedMessage + */ + public ProductPriceCustomFieldsRemovedMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldsRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldsRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldsRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldsRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldsRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldsRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldsRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldsRemovedMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldsRemovedMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldsRemovedMessage.class + ": staged is missing"); + return new ProductPriceCustomFieldsRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged); + } + + /** + * builds ProductPriceCustomFieldsRemovedMessage without checking for non-null required values + * @return ProductPriceCustomFieldsRemovedMessage + */ + public ProductPriceCustomFieldsRemovedMessage buildUnchecked() { + return new ProductPriceCustomFieldsRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged); + } + + /** + * factory method for an instance of ProductPriceCustomFieldsRemovedMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessageBuilder of() { + return new ProductPriceCustomFieldsRemovedMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldsRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessageBuilder of( + final ProductPriceCustomFieldsRemovedMessage template) { + ProductPriceCustomFieldsRemovedMessageBuilder builder = new ProductPriceCustomFieldsRemovedMessageBuilder(); + 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.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageImpl.java new file mode 100644 index 0000000000..cfe51ca908 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageImpl.java @@ -0,0 +1,336 @@ + +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 removing a Custom Type from a Price using the Set Price Custom Type update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsRemovedMessageImpl implements ProductPriceCustomFieldsRemovedMessage, 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 priceId; + + private Long variantId; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldsRemovedMessageImpl(@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("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged) { + 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.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldsRemovedMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED; + } + + /** + *

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.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + 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 setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldsRemovedMessageImpl that = (ProductPriceCustomFieldsRemovedMessageImpl) 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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .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(priceId) + .append(variantId) + .append(staged) + .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("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayload.java new file mode 100644 index 0000000000..5c966eab68 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayload.java @@ -0,0 +1,167 @@ + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after removing a Custom Type from a Price using the Set Price Custom Type update action.

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

+ *     ProductPriceCustomFieldsRemovedMessagePayload productPriceCustomFieldsRemovedMessagePayload = ProductPriceCustomFieldsRemovedMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldsRemovedMessagePayloadImpl.class) +public interface ProductPriceCustomFieldsRemovedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductPriceCustomFieldsRemovedMessagePayload + */ + String PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED = "ProductPriceCustomFieldsRemoved"; + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductPriceCustomFieldsRemovedMessagePayload + */ + public static ProductPriceCustomFieldsRemovedMessagePayload of() { + return new ProductPriceCustomFieldsRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldsRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldsRemovedMessagePayload of( + final ProductPriceCustomFieldsRemovedMessagePayload template) { + ProductPriceCustomFieldsRemovedMessagePayloadImpl instance = new ProductPriceCustomFieldsRemovedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldsRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldsRemovedMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldsRemovedMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldsRemovedMessagePayloadImpl instance = new ProductPriceCustomFieldsRemovedMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldsRemovedMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessagePayloadBuilder builder() { + return ProductPriceCustomFieldsRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldsRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessagePayloadBuilder builder( + final ProductPriceCustomFieldsRemovedMessagePayload template) { + return ProductPriceCustomFieldsRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldsRemovedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadBuilder.java new file mode 100644 index 0000000000..9b81b2865d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadBuilder.java @@ -0,0 +1,135 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldsRemovedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldsRemovedMessagePayload productPriceCustomFieldsRemovedMessagePayload = ProductPriceCustomFieldsRemovedMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsRemovedMessagePayloadBuilder + implements Builder { + + private String priceId; + + private Long variantId; + + private Boolean staged; + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsRemovedMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductPriceCustomFieldsRemovedMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldsRemovedMessagePayload + */ + public ProductPriceCustomFieldsRemovedMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldsRemovedMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, + ProductPriceCustomFieldsRemovedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldsRemovedMessagePayload.class + ": staged is missing"); + return new ProductPriceCustomFieldsRemovedMessagePayloadImpl(priceId, variantId, staged); + } + + /** + * builds ProductPriceCustomFieldsRemovedMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldsRemovedMessagePayload + */ + public ProductPriceCustomFieldsRemovedMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldsRemovedMessagePayloadImpl(priceId, variantId, staged); + } + + /** + * factory method for an instance of ProductPriceCustomFieldsRemovedMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessagePayloadBuilder of() { + return new ProductPriceCustomFieldsRemovedMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldsRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsRemovedMessagePayloadBuilder of( + final ProductPriceCustomFieldsRemovedMessagePayload template) { + ProductPriceCustomFieldsRemovedMessagePayloadBuilder builder = new ProductPriceCustomFieldsRemovedMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadImpl.java new file mode 100644 index 0000000000..f263f72ed2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadImpl.java @@ -0,0 +1,132 @@ + +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 removing a Custom Type from a Price using the Set Price Custom Type update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsRemovedMessagePayloadImpl + implements ProductPriceCustomFieldsRemovedMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldsRemovedMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldsRemovedMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

Unique identifier of the Price from which the Custom Type was removed.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldsRemovedMessagePayloadImpl that = (ProductPriceCustomFieldsRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(priceId).append(variantId).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessage.java new file mode 100644 index 0000000000..b999357602 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessage.java @@ -0,0 +1,231 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.type.CustomFields; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Set Price Custom Type update action.

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

+ *     ProductPriceCustomFieldsSetMessage productPriceCustomFieldsSetMessage = ProductPriceCustomFieldsSetMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .customField(customFieldBuilder -> customFieldBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldsSetMessageImpl.class) +public interface ProductPriceCustomFieldsSetMessage extends Message { + + /** + * discriminator value for ProductPriceCustomFieldsSetMessage + */ + String PRODUCT_PRICE_CUSTOM_FIELDS_SET = "ProductPriceCustomFieldsSet"; + + /** + *

Unique identifier of the Price on which the Custom Type was set.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Custom Fields that were set.

+ * @return customField + */ + @NotNull + @Valid + @JsonProperty("customField") + public CustomFields getCustomField(); + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ * @return oldTypeId + */ + + @JsonProperty("oldTypeId") + public String getOldTypeId(); + + /** + *

Unique identifier of the Price on which the Custom Type was set.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *

Custom Fields that were set.

+ * @param customField value to be set + */ + + public void setCustomField(final CustomFields customField); + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ * @param oldTypeId value to be set + */ + + public void setOldTypeId(final String oldTypeId); + + /** + * factory method + * @return instance of ProductPriceCustomFieldsSetMessage + */ + public static ProductPriceCustomFieldsSetMessage of() { + return new ProductPriceCustomFieldsSetMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldsSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldsSetMessage of(final ProductPriceCustomFieldsSetMessage template) { + ProductPriceCustomFieldsSetMessageImpl instance = new ProductPriceCustomFieldsSetMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setCustomField(template.getCustomField()); + instance.setOldTypeId(template.getOldTypeId()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldsSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldsSetMessage deepCopy( + @Nullable final ProductPriceCustomFieldsSetMessage template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldsSetMessageImpl instance = new ProductPriceCustomFieldsSetMessageImpl(); + 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.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setCustomField(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustomField())); + instance.setOldTypeId(template.getOldTypeId()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldsSetMessage + * @return builder + */ + public static ProductPriceCustomFieldsSetMessageBuilder builder() { + return ProductPriceCustomFieldsSetMessageBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldsSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsSetMessageBuilder builder(final ProductPriceCustomFieldsSetMessage template) { + return ProductPriceCustomFieldsSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldsSetMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageBuilder.java new file mode 100644 index 0000000000..d1acde4bc9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageBuilder.java @@ -0,0 +1,558 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldsSetMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldsSetMessage productPriceCustomFieldsSetMessage = ProductPriceCustomFieldsSetMessage.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)
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .customField(customFieldBuilder -> customFieldBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsSetMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private com.commercetools.api.models.type.CustomFields customField; + + @Nullable + private String oldTypeId; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

+ * @param version value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder 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.

+ * @param sequenceNumber value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder sequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @param resource value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder 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 ProductPriceCustomFieldsSetMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @param resourceVersion value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder 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.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Unique identifier of the Price on which the Custom Type was set.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Custom Fields that were set.

+ * @param builder function to build the customField value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder customField( + Function builder) { + this.customField = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

Custom Fields that were set.

+ * @param builder function to build the customField value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder withCustomField( + Function builder) { + this.customField = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()); + return this; + } + + /** + *

Custom Fields that were set.

+ * @param customField value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder customField( + final com.commercetools.api.models.type.CustomFields customField) { + this.customField = customField; + return this; + } + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ * @param oldTypeId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessageBuilder oldTypeId(@Nullable final String oldTypeId) { + this.oldTypeId = oldTypeId; + 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.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price on which the Custom Type was set.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Custom Fields that were set.

+ * @return customField + */ + + public com.commercetools.api.models.type.CustomFields getCustomField() { + return this.customField; + } + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ * @return oldTypeId + */ + + @Nullable + public String getOldTypeId() { + return this.oldTypeId; + } + + /** + * builds ProductPriceCustomFieldsSetMessage with checking for non-null required values + * @return ProductPriceCustomFieldsSetMessage + */ + public ProductPriceCustomFieldsSetMessage build() { + Objects.requireNonNull(id, ProductPriceCustomFieldsSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductPriceCustomFieldsSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductPriceCustomFieldsSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductPriceCustomFieldsSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductPriceCustomFieldsSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductPriceCustomFieldsSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductPriceCustomFieldsSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(priceId, ProductPriceCustomFieldsSetMessage.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldsSetMessage.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldsSetMessage.class + ": staged is missing"); + Objects.requireNonNull(customField, ProductPriceCustomFieldsSetMessage.class + ": customField is missing"); + return new ProductPriceCustomFieldsSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, customField, oldTypeId); + } + + /** + * builds ProductPriceCustomFieldsSetMessage without checking for non-null required values + * @return ProductPriceCustomFieldsSetMessage + */ + public ProductPriceCustomFieldsSetMessage buildUnchecked() { + return new ProductPriceCustomFieldsSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, priceId, variantId, + staged, customField, oldTypeId); + } + + /** + * factory method for an instance of ProductPriceCustomFieldsSetMessageBuilder + * @return builder + */ + public static ProductPriceCustomFieldsSetMessageBuilder of() { + return new ProductPriceCustomFieldsSetMessageBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldsSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsSetMessageBuilder of(final ProductPriceCustomFieldsSetMessage template) { + ProductPriceCustomFieldsSetMessageBuilder builder = new ProductPriceCustomFieldsSetMessageBuilder(); + 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.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.customField = template.getCustomField(); + builder.oldTypeId = template.getOldTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageImpl.java new file mode 100644 index 0000000000..0ca43b114a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageImpl.java @@ -0,0 +1,376 @@ + +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 Set Price Custom Type update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsSetMessageImpl implements ProductPriceCustomFieldsSetMessage, 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 priceId; + + private Long variantId; + + private Boolean staged; + + private com.commercetools.api.models.type.CustomFields customField; + + private String oldTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldsSetMessageImpl(@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("priceId") final String priceId, @JsonProperty("variantId") final Long variantId, + @JsonProperty("staged") final Boolean staged, + @JsonProperty("customField") final com.commercetools.api.models.type.CustomFields customField, + @JsonProperty("oldTypeId") final String oldTypeId) { + 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.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.customField = customField; + this.oldTypeId = oldTypeId; + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_SET; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldsSetMessageImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_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.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

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

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

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.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Unique identifier of the Price on which the Custom Type was set.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Custom Fields that were set.

+ */ + + public com.commercetools.api.models.type.CustomFields getCustomField() { + return this.customField; + } + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ */ + + public String getOldTypeId() { + return this.oldTypeId; + } + + 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 setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setCustomField(final com.commercetools.api.models.type.CustomFields customField) { + this.customField = customField; + } + + public void setOldTypeId(final String oldTypeId) { + this.oldTypeId = oldTypeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldsSetMessageImpl that = (ProductPriceCustomFieldsSetMessageImpl) 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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(customField, that.customField) + .append(oldTypeId, that.oldTypeId) + .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(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(customField, that.customField) + .append(oldTypeId, that.oldTypeId) + .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(priceId) + .append(variantId) + .append(staged) + .append(customField) + .append(oldTypeId) + .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("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("customField", customField) + .append("oldTypeId", oldTypeId) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayload.java new file mode 100644 index 0000000000..b2a8724dd4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayload.java @@ -0,0 +1,205 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.type.CustomFields; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Set Price Custom Type update action.

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

+ *     ProductPriceCustomFieldsSetMessagePayload productPriceCustomFieldsSetMessagePayload = ProductPriceCustomFieldsSetMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .customField(customFieldBuilder -> customFieldBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductPriceCustomFieldsSetMessagePayloadImpl.class) +public interface ProductPriceCustomFieldsSetMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductPriceCustomFieldsSetMessagePayload + */ + String PRODUCT_PRICE_CUSTOM_FIELDS_SET = "ProductPriceCustomFieldsSet"; + + /** + *

Unique identifier of the Price on which the Custom Type was set.

+ * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + @NotNull + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Custom Fields that were set.

+ * @return customField + */ + @NotNull + @Valid + @JsonProperty("customField") + public CustomFields getCustomField(); + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ * @return oldTypeId + */ + + @JsonProperty("oldTypeId") + public String getOldTypeId(); + + /** + *

Unique identifier of the Price on which the Custom Type was set.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + *

Custom Fields that were set.

+ * @param customField value to be set + */ + + public void setCustomField(final CustomFields customField); + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ * @param oldTypeId value to be set + */ + + public void setOldTypeId(final String oldTypeId); + + /** + * factory method + * @return instance of ProductPriceCustomFieldsSetMessagePayload + */ + public static ProductPriceCustomFieldsSetMessagePayload of() { + return new ProductPriceCustomFieldsSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductPriceCustomFieldsSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductPriceCustomFieldsSetMessagePayload of( + final ProductPriceCustomFieldsSetMessagePayload template) { + ProductPriceCustomFieldsSetMessagePayloadImpl instance = new ProductPriceCustomFieldsSetMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setCustomField(template.getCustomField()); + instance.setOldTypeId(template.getOldTypeId()); + return instance; + } + + /** + * factory method to create a deep copy of ProductPriceCustomFieldsSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductPriceCustomFieldsSetMessagePayload deepCopy( + @Nullable final ProductPriceCustomFieldsSetMessagePayload template) { + if (template == null) { + return null; + } + ProductPriceCustomFieldsSetMessagePayloadImpl instance = new ProductPriceCustomFieldsSetMessagePayloadImpl(); + instance.setPriceId(template.getPriceId()); + instance.setVariantId(template.getVariantId()); + instance.setStaged(template.getStaged()); + instance.setCustomField(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustomField())); + instance.setOldTypeId(template.getOldTypeId()); + return instance; + } + + /** + * builder factory method for ProductPriceCustomFieldsSetMessagePayload + * @return builder + */ + public static ProductPriceCustomFieldsSetMessagePayloadBuilder builder() { + return ProductPriceCustomFieldsSetMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductPriceCustomFieldsSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsSetMessagePayloadBuilder builder( + final ProductPriceCustomFieldsSetMessagePayload template) { + return ProductPriceCustomFieldsSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductPriceCustomFieldsSetMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadBuilder.java new file mode 100644 index 0000000000..6b85141f2f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadBuilder.java @@ -0,0 +1,213 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductPriceCustomFieldsSetMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductPriceCustomFieldsSetMessagePayload productPriceCustomFieldsSetMessagePayload = ProductPriceCustomFieldsSetMessagePayload.builder()
+ *             .priceId("{priceId}")
+ *             .variantId(0.3)
+ *             .staged(true)
+ *             .customField(customFieldBuilder -> customFieldBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsSetMessagePayloadBuilder + implements Builder { + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private com.commercetools.api.models.type.CustomFields customField; + + @Nullable + private String oldTypeId; + + /** + *

Unique identifier of the Price on which the Custom Type was set.

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

Unique identifier of the ProductVariant to which the Price belongs.

+ * @param variantId value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder variantId(final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @param staged value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder staged(final Boolean staged) { + this.staged = staged; + return this; + } + + /** + *

Custom Fields that were set.

+ * @param builder function to build the customField value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder customField( + Function builder) { + this.customField = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

Custom Fields that were set.

+ * @param builder function to build the customField value + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder withCustomField( + Function builder) { + this.customField = builder.apply(com.commercetools.api.models.type.CustomFieldsBuilder.of()); + return this; + } + + /** + *

Custom Fields that were set.

+ * @param customField value to be set + * @return Builder + */ + + public ProductPriceCustomFieldsSetMessagePayloadBuilder customField( + final com.commercetools.api.models.type.CustomFields customField) { + this.customField = customField; + return this; + } + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

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

Unique identifier of the Price on which the Custom Type was set.

+ * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ * @return staged + */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Custom Fields that were set.

+ * @return customField + */ + + public com.commercetools.api.models.type.CustomFields getCustomField() { + return this.customField; + } + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ * @return oldTypeId + */ + + @Nullable + public String getOldTypeId() { + return this.oldTypeId; + } + + /** + * builds ProductPriceCustomFieldsSetMessagePayload with checking for non-null required values + * @return ProductPriceCustomFieldsSetMessagePayload + */ + public ProductPriceCustomFieldsSetMessagePayload build() { + Objects.requireNonNull(priceId, ProductPriceCustomFieldsSetMessagePayload.class + ": priceId is missing"); + Objects.requireNonNull(variantId, ProductPriceCustomFieldsSetMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(staged, ProductPriceCustomFieldsSetMessagePayload.class + ": staged is missing"); + Objects.requireNonNull(customField, + ProductPriceCustomFieldsSetMessagePayload.class + ": customField is missing"); + return new ProductPriceCustomFieldsSetMessagePayloadImpl(priceId, variantId, staged, customField, oldTypeId); + } + + /** + * builds ProductPriceCustomFieldsSetMessagePayload without checking for non-null required values + * @return ProductPriceCustomFieldsSetMessagePayload + */ + public ProductPriceCustomFieldsSetMessagePayload buildUnchecked() { + return new ProductPriceCustomFieldsSetMessagePayloadImpl(priceId, variantId, staged, customField, oldTypeId); + } + + /** + * factory method for an instance of ProductPriceCustomFieldsSetMessagePayloadBuilder + * @return builder + */ + public static ProductPriceCustomFieldsSetMessagePayloadBuilder of() { + return new ProductPriceCustomFieldsSetMessagePayloadBuilder(); + } + + /** + * create builder for ProductPriceCustomFieldsSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductPriceCustomFieldsSetMessagePayloadBuilder of( + final ProductPriceCustomFieldsSetMessagePayload template) { + ProductPriceCustomFieldsSetMessagePayloadBuilder builder = new ProductPriceCustomFieldsSetMessagePayloadBuilder(); + builder.priceId = template.getPriceId(); + builder.variantId = template.getVariantId(); + builder.staged = template.getStaged(); + builder.customField = template.getCustomField(); + builder.oldTypeId = template.getOldTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadImpl.java new file mode 100644 index 0000000000..180a34a396 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadImpl.java @@ -0,0 +1,176 @@ + +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 Set Price Custom Type update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductPriceCustomFieldsSetMessagePayloadImpl + implements ProductPriceCustomFieldsSetMessagePayload, ModelBase { + + private String type; + + private String priceId; + + private Long variantId; + + private Boolean staged; + + private com.commercetools.api.models.type.CustomFields customField; + + private String oldTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + ProductPriceCustomFieldsSetMessagePayloadImpl(@JsonProperty("priceId") final String priceId, + @JsonProperty("variantId") final Long variantId, @JsonProperty("staged") final Boolean staged, + @JsonProperty("customField") final com.commercetools.api.models.type.CustomFields customField, + @JsonProperty("oldTypeId") final String oldTypeId) { + this.priceId = priceId; + this.variantId = variantId; + this.staged = staged; + this.customField = customField; + this.oldTypeId = oldTypeId; + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_SET; + } + + /** + * create empty instance + */ + public ProductPriceCustomFieldsSetMessagePayloadImpl() { + this.type = PRODUCT_PRICE_CUSTOM_FIELDS_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

Unique identifier of the Price on which the Custom Type was set.

+ */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

Unique identifier of the ProductVariant to which the Price belongs.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Whether the update was only applied to the staged Product Projection.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Custom Fields that were set.

+ */ + + public com.commercetools.api.models.type.CustomFields getCustomField() { + return this.customField; + } + + /** + *

id of the previous Custom Type. Absent if there was no previous Custom Type present.

+ */ + + public String getOldTypeId() { + return this.oldTypeId; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setCustomField(final com.commercetools.api.models.type.CustomFields customField) { + this.customField = customField; + } + + public void setOldTypeId(final String oldTypeId) { + this.oldTypeId = oldTypeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductPriceCustomFieldsSetMessagePayloadImpl that = (ProductPriceCustomFieldsSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(customField, that.customField) + .append(oldTypeId, that.oldTypeId) + .append(type, that.type) + .append(priceId, that.priceId) + .append(variantId, that.variantId) + .append(staged, that.staged) + .append(customField, that.customField) + .append(oldTypeId, that.oldTypeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(priceId) + .append(variantId) + .append(staged) + .append(customField) + .append(oldTypeId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("priceId", priceId) + .append("variantId", variantId) + .append("staged", staged) + .append("customField", customField) + .append("oldTypeId", oldTypeId) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldAddedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldAddedMessageExpansionBuilderDsl.java new file mode 100644 index 0000000000..7da2aeba0c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldAddedMessageExpansionBuilderDsl.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductPriceCustomFieldAddedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductPriceCustomFieldAddedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductPriceCustomFieldAddedMessageExpansionBuilderDsl of() { + return new ProductPriceCustomFieldAddedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductPriceCustomFieldAddedMessageExpansionBuilderDsl of(final List path) { + return new ProductPriceCustomFieldAddedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.ObjectExpansionDsl value() { + return com.commercetools.api.predicates.expansion.ObjectExpansionDsl.of(appendOne(path, "value")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldChangedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldChangedMessageExpansionBuilderDsl.java new file mode 100644 index 0000000000..c89a73f139 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldChangedMessageExpansionBuilderDsl.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductPriceCustomFieldChangedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductPriceCustomFieldChangedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductPriceCustomFieldChangedMessageExpansionBuilderDsl of() { + return new ProductPriceCustomFieldChangedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductPriceCustomFieldChangedMessageExpansionBuilderDsl of(final List path) { + return new ProductPriceCustomFieldChangedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.ObjectExpansionDsl value() { + return com.commercetools.api.predicates.expansion.ObjectExpansionDsl.of(appendOne(path, "value")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl.java new file mode 100644 index 0000000000..caddfabc5f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl of() { + return new ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl of(final List path) { + return new ProductPriceCustomFieldRemovedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl.java new file mode 100644 index 0000000000..bf83f4880f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl of() { + return new ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl of(final List path) { + return new ProductPriceCustomFieldsRemovedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldsSetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldsSetMessageExpansionBuilderDsl.java new file mode 100644 index 0000000000..2766c0d821 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductPriceCustomFieldsSetMessageExpansionBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductPriceCustomFieldsSetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductPriceCustomFieldsSetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductPriceCustomFieldsSetMessageExpansionBuilderDsl of() { + return new ProductPriceCustomFieldsSetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductPriceCustomFieldsSetMessageExpansionBuilderDsl of(final List path) { + return new ProductPriceCustomFieldsSetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl customField() { + return com.commercetools.api.predicates.expansion.type.CustomFieldsExpansionBuilderDsl + .of(appendOne(path, "customField")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java index 0454f5b167..3fbf0521af 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java @@ -880,6 +880,46 @@ public CombinationQueryPredicate asProductPriceCh MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductPriceCustomFieldAdded( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductPriceCustomFieldChanged( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductPriceCustomFieldRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductPriceCustomFieldsRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductPriceCustomFieldsSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductPriceDiscountsSet( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java index 03f2ea258d..871ab6f20b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java @@ -919,6 +919,43 @@ public CombinationQueryPredicate asProductPriceChanged( MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductPriceCustomFieldAdded( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldAddedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductPriceCustomFieldChanged( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldChangedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductPriceCustomFieldRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldRemovedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductPriceCustomFieldsRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductPriceCustomFieldsSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ProductPriceCustomFieldsSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductPriceDiscountsSet( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 0000000000..38cbc62734 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl { + public ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl of() { + return new ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldAddedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldAddedMessageQueryBuilderDsl.java new file mode 100644 index 0000000000..ed63ba996f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldAddedMessageQueryBuilderDsl.java @@ -0,0 +1,124 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldAddedMessageQueryBuilderDsl { + public ProductPriceCustomFieldAddedMessageQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldAddedMessageQueryBuilderDsl of() { + return new ProductPriceCustomFieldAddedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldAddedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 0000000000..8ba28b1e00 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl { + public ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl of() { + return new ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldChangedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldChangedMessageQueryBuilderDsl.java new file mode 100644 index 0000000000..0ac0944a87 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldChangedMessageQueryBuilderDsl.java @@ -0,0 +1,124 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldChangedMessageQueryBuilderDsl { + public ProductPriceCustomFieldChangedMessageQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldChangedMessageQueryBuilderDsl of() { + return new ProductPriceCustomFieldChangedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldChangedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 0000000000..8ab24efd11 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl { + public ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl of() { + return new ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldRemovedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldRemovedMessageQueryBuilderDsl.java new file mode 100644 index 0000000000..e2fd69046e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldRemovedMessageQueryBuilderDsl.java @@ -0,0 +1,118 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldRemovedMessageQueryBuilderDsl { + public ProductPriceCustomFieldRemovedMessageQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldRemovedMessageQueryBuilderDsl of() { + return new ProductPriceCustomFieldRemovedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldRemovedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 0000000000..b91f9f803f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl { + public ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl of() { + return new ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl.java new file mode 100644 index 0000000000..e7d3ed16e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl.java @@ -0,0 +1,112 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl { + public ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl of() { + return new ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsRemovedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 0000000000..60e3b57eec --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,55 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl { + public ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl of() { + return new ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate customField( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customField")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.CustomFieldsQueryBuilderDsl.of())), + ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder oldTypeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldTypeId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsSetMessageQueryBuilderDsl.java new file mode 100644 index 0000000000..f8a7550a79 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductPriceCustomFieldsSetMessageQueryBuilderDsl.java @@ -0,0 +1,127 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductPriceCustomFieldsSetMessageQueryBuilderDsl { + public ProductPriceCustomFieldsSetMessageQueryBuilderDsl() { + } + + public static ProductPriceCustomFieldsSetMessageQueryBuilderDsl of() { + return new ProductPriceCustomFieldsSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder priceId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("priceId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate customField( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customField")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.CustomFieldsQueryBuilderDsl.of())), + ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder oldTypeId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldTypeId")), + p -> new CombinationQueryPredicate<>(p, ProductPriceCustomFieldsSetMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadTest.java new file mode 100644 index 0000000000..5f948bd31e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessagePayloadTest.java @@ -0,0 +1,71 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldAddedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldAddedMessagePayloadBuilder builder) { + ProductPriceCustomFieldAddedMessagePayload productPriceCustomFieldAddedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldAddedMessagePayload) + .isInstanceOf(ProductPriceCustomFieldAddedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductPriceCustomFieldAddedMessagePayload.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldAddedMessagePayload.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldAddedMessagePayload.builder().staged(true) }, + new Object[] { ProductPriceCustomFieldAddedMessagePayload.builder().name("name") }, + new Object[] { ProductPriceCustomFieldAddedMessagePayload.builder().value("value") } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldAddedMessagePayload value = ProductPriceCustomFieldAddedMessagePayload.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldAddedMessagePayload value = ProductPriceCustomFieldAddedMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldAddedMessagePayload value = ProductPriceCustomFieldAddedMessagePayload.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void name() { + ProductPriceCustomFieldAddedMessagePayload value = ProductPriceCustomFieldAddedMessagePayload.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ProductPriceCustomFieldAddedMessagePayload value = ProductPriceCustomFieldAddedMessagePayload.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageTest.java new file mode 100644 index 0000000000..cdb3d12c24 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldAddedMessageTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldAddedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldAddedMessageBuilder builder) { + ProductPriceCustomFieldAddedMessage productPriceCustomFieldAddedMessage = builder.buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldAddedMessage) + .isInstanceOf(ProductPriceCustomFieldAddedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductPriceCustomFieldAddedMessage.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldAddedMessage.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldAddedMessage.builder().staged(true) }, + new Object[] { ProductPriceCustomFieldAddedMessage.builder().name("name") }, + new Object[] { ProductPriceCustomFieldAddedMessage.builder().value("value") } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldAddedMessage value = ProductPriceCustomFieldAddedMessage.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldAddedMessage value = ProductPriceCustomFieldAddedMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldAddedMessage value = ProductPriceCustomFieldAddedMessage.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void name() { + ProductPriceCustomFieldAddedMessage value = ProductPriceCustomFieldAddedMessage.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ProductPriceCustomFieldAddedMessage value = ProductPriceCustomFieldAddedMessage.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadTest.java new file mode 100644 index 0000000000..446e40aaf2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessagePayloadTest.java @@ -0,0 +1,71 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldChangedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldChangedMessagePayloadBuilder builder) { + ProductPriceCustomFieldChangedMessagePayload productPriceCustomFieldChangedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldChangedMessagePayload) + .isInstanceOf(ProductPriceCustomFieldChangedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductPriceCustomFieldChangedMessagePayload.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldChangedMessagePayload.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldChangedMessagePayload.builder().staged(true) }, + new Object[] { ProductPriceCustomFieldChangedMessagePayload.builder().name("name") }, + new Object[] { ProductPriceCustomFieldChangedMessagePayload.builder().value("value") } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldChangedMessagePayload value = ProductPriceCustomFieldChangedMessagePayload.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldChangedMessagePayload value = ProductPriceCustomFieldChangedMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldChangedMessagePayload value = ProductPriceCustomFieldChangedMessagePayload.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void name() { + ProductPriceCustomFieldChangedMessagePayload value = ProductPriceCustomFieldChangedMessagePayload.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ProductPriceCustomFieldChangedMessagePayload value = ProductPriceCustomFieldChangedMessagePayload.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageTest.java new file mode 100644 index 0000000000..a685115623 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldChangedMessageTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldChangedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldChangedMessageBuilder builder) { + ProductPriceCustomFieldChangedMessage productPriceCustomFieldChangedMessage = builder.buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldChangedMessage) + .isInstanceOf(ProductPriceCustomFieldChangedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductPriceCustomFieldChangedMessage.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldChangedMessage.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldChangedMessage.builder().staged(true) }, + new Object[] { ProductPriceCustomFieldChangedMessage.builder().name("name") }, + new Object[] { ProductPriceCustomFieldChangedMessage.builder().value("value") } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldChangedMessage value = ProductPriceCustomFieldChangedMessage.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldChangedMessage value = ProductPriceCustomFieldChangedMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldChangedMessage value = ProductPriceCustomFieldChangedMessage.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void name() { + ProductPriceCustomFieldChangedMessage value = ProductPriceCustomFieldChangedMessage.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ProductPriceCustomFieldChangedMessage value = ProductPriceCustomFieldChangedMessage.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadTest.java new file mode 100644 index 0000000000..3fb9138fba --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessagePayloadTest.java @@ -0,0 +1,63 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldRemovedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldRemovedMessagePayloadBuilder builder) { + ProductPriceCustomFieldRemovedMessagePayload productPriceCustomFieldRemovedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldRemovedMessagePayload) + .isInstanceOf(ProductPriceCustomFieldRemovedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductPriceCustomFieldRemovedMessagePayload.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldRemovedMessagePayload.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldRemovedMessagePayload.builder().staged(true) }, + new Object[] { ProductPriceCustomFieldRemovedMessagePayload.builder().name("name") } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldRemovedMessagePayload value = ProductPriceCustomFieldRemovedMessagePayload.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldRemovedMessagePayload value = ProductPriceCustomFieldRemovedMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldRemovedMessagePayload value = ProductPriceCustomFieldRemovedMessagePayload.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void name() { + ProductPriceCustomFieldRemovedMessagePayload value = ProductPriceCustomFieldRemovedMessagePayload.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageTest.java new file mode 100644 index 0000000000..c7c989a636 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldRemovedMessageTest.java @@ -0,0 +1,61 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldRemovedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldRemovedMessageBuilder builder) { + ProductPriceCustomFieldRemovedMessage productPriceCustomFieldRemovedMessage = builder.buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldRemovedMessage) + .isInstanceOf(ProductPriceCustomFieldRemovedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductPriceCustomFieldRemovedMessage.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldRemovedMessage.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldRemovedMessage.builder().staged(true) }, + new Object[] { ProductPriceCustomFieldRemovedMessage.builder().name("name") } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldRemovedMessage value = ProductPriceCustomFieldRemovedMessage.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldRemovedMessage value = ProductPriceCustomFieldRemovedMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldRemovedMessage value = ProductPriceCustomFieldRemovedMessage.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void name() { + ProductPriceCustomFieldRemovedMessage value = ProductPriceCustomFieldRemovedMessage.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadTest.java new file mode 100644 index 0000000000..ca812f0bc6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessagePayloadTest.java @@ -0,0 +1,55 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldsRemovedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldsRemovedMessagePayloadBuilder builder) { + ProductPriceCustomFieldsRemovedMessagePayload productPriceCustomFieldsRemovedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldsRemovedMessagePayload) + .isInstanceOf(ProductPriceCustomFieldsRemovedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductPriceCustomFieldsRemovedMessagePayload.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldsRemovedMessagePayload.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldsRemovedMessagePayload.builder().staged(true) } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldsRemovedMessagePayload value = ProductPriceCustomFieldsRemovedMessagePayload.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldsRemovedMessagePayload value = ProductPriceCustomFieldsRemovedMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldsRemovedMessagePayload value = ProductPriceCustomFieldsRemovedMessagePayload.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageTest.java new file mode 100644 index 0000000000..37f2d20375 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsRemovedMessageTest.java @@ -0,0 +1,53 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldsRemovedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldsRemovedMessageBuilder builder) { + ProductPriceCustomFieldsRemovedMessage productPriceCustomFieldsRemovedMessage = builder.buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldsRemovedMessage) + .isInstanceOf(ProductPriceCustomFieldsRemovedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductPriceCustomFieldsRemovedMessage.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldsRemovedMessage.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldsRemovedMessage.builder().staged(true) } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldsRemovedMessage value = ProductPriceCustomFieldsRemovedMessage.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldsRemovedMessage value = ProductPriceCustomFieldsRemovedMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldsRemovedMessage value = ProductPriceCustomFieldsRemovedMessage.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadTest.java new file mode 100644 index 0000000000..7a759605be --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessagePayloadTest.java @@ -0,0 +1,71 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldsSetMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldsSetMessagePayloadBuilder builder) { + ProductPriceCustomFieldsSetMessagePayload productPriceCustomFieldsSetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldsSetMessagePayload) + .isInstanceOf(ProductPriceCustomFieldsSetMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductPriceCustomFieldsSetMessagePayload.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldsSetMessagePayload.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldsSetMessagePayload.builder().staged(true) }, + new Object[] { ProductPriceCustomFieldsSetMessagePayload.builder() + .customField(new com.commercetools.api.models.type.CustomFieldsImpl()) }, + new Object[] { ProductPriceCustomFieldsSetMessagePayload.builder().oldTypeId("oldTypeId") } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldsSetMessagePayload value = ProductPriceCustomFieldsSetMessagePayload.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldsSetMessagePayload value = ProductPriceCustomFieldsSetMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldsSetMessagePayload value = ProductPriceCustomFieldsSetMessagePayload.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void customField() { + ProductPriceCustomFieldsSetMessagePayload value = ProductPriceCustomFieldsSetMessagePayload.of(); + value.setCustomField(new com.commercetools.api.models.type.CustomFieldsImpl()); + Assertions.assertThat(value.getCustomField()) + .isEqualTo(new com.commercetools.api.models.type.CustomFieldsImpl()); + } + + @Test + public void oldTypeId() { + ProductPriceCustomFieldsSetMessagePayload value = ProductPriceCustomFieldsSetMessagePayload.of(); + value.setOldTypeId("oldTypeId"); + Assertions.assertThat(value.getOldTypeId()).isEqualTo("oldTypeId"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageTest.java new file mode 100644 index 0000000000..0ab9b164c7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductPriceCustomFieldsSetMessageTest.java @@ -0,0 +1,71 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductPriceCustomFieldsSetMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductPriceCustomFieldsSetMessageBuilder builder) { + ProductPriceCustomFieldsSetMessage productPriceCustomFieldsSetMessage = builder.buildUnchecked(); + Assertions.assertThat(productPriceCustomFieldsSetMessage) + .isInstanceOf(ProductPriceCustomFieldsSetMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductPriceCustomFieldsSetMessage.builder().priceId("priceId") }, + new Object[] { ProductPriceCustomFieldsSetMessage.builder().variantId(5L) }, + new Object[] { ProductPriceCustomFieldsSetMessage.builder().staged(true) }, + new Object[] { ProductPriceCustomFieldsSetMessage.builder() + .customField(new com.commercetools.api.models.type.CustomFieldsImpl()) }, + new Object[] { ProductPriceCustomFieldsSetMessage.builder().oldTypeId("oldTypeId") } }; + } + + @Test + public void priceId() { + ProductPriceCustomFieldsSetMessage value = ProductPriceCustomFieldsSetMessage.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void variantId() { + ProductPriceCustomFieldsSetMessage value = ProductPriceCustomFieldsSetMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void staged() { + ProductPriceCustomFieldsSetMessage value = ProductPriceCustomFieldsSetMessage.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void customField() { + ProductPriceCustomFieldsSetMessage value = ProductPriceCustomFieldsSetMessage.of(); + value.setCustomField(new com.commercetools.api.models.type.CustomFieldsImpl()); + Assertions.assertThat(value.getCustomField()) + .isEqualTo(new com.commercetools.api.models.type.CustomFieldsImpl()); + } + + @Test + public void oldTypeId() { + ProductPriceCustomFieldsSetMessage value = ProductPriceCustomFieldsSetMessage.of(); + value.setOldTypeId("oldTypeId"); + Assertions.assertThat(value.getOldTypeId()).isEqualTo("oldTypeId"); + } +} diff --git a/references.txt b/references.txt index f0a67d60b6..7b6b85b5fd 100644 --- a/references.txt +++ b/references.txt @@ -269,3 +269,4 @@ e5268785dcaf7bd56dafa13f2901b69468552fd0 f406baef04eced1a7bda3817e935f54e234a9f4e c163df6435d9b4770f1d07cd2cb379c1f620ceb5 12d3fba1b3f1f281cc37eaa04513df858393ab39 +6bd7dfaf13befab20f63e12bcda891250e2637c1