diff --git a/changes.md b/changes.md index 0a629920a4..4074481436 100644 --- a/changes.md +++ b/changes.md @@ -24,6 +24,12 @@ - added type `CountOnCustomLineItemUnits` - added type `CountOnLineItemUnits` - added type `PatternComponent` +- added type `ShoppingListLineItemAddedMessage` +- added type `ShoppingListLineItemRemovedMessage` +- added type `ShoppingListMessage` +- added type `ShoppingListLineItemAddedMessagePayload` +- added type `ShoppingListLineItemRemovedMessagePayload` +- added type `ShoppingListMessagePayload` @@ -31,6 +37,7 @@ Added Enum(s) - added enum `Canceled` to type `ShipmentState` +- added enum `shopping-list` to type `MessageSubscriptionResourceTypeId` 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 da5197ba4b..d94cb58296 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -13504,6 +13504,11 @@ type ShoppingListLineItem { variant: ProductVariant } +type ShoppingListLineItemAdded implements MessagePayload { + lineItem: ShoppingListLineItem! + type: String! +} + input ShoppingListLineItemDraft { productId: String key: String @@ -13514,6 +13519,11 @@ input ShoppingListLineItemDraft { addedAt: DateTime } +type ShoppingListLineItemRemoved implements MessagePayload { + lineItem: ShoppingListLineItem! + type: String! +} + "Fields to access shopping lists. Includes direct access to a single list and searching for shopping lists." interface ShoppingListQueryInterface { shoppingList( 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 4df0b826f8..93c69bcb10 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 @@ -256,6 +256,8 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ReviewCreatedMessageImpl.class, name = ReviewCreatedMessage.REVIEW_CREATED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ReviewRatingSetMessageImpl.class, name = ReviewRatingSetMessage.REVIEW_RATING_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ReviewStateTransitionMessageImpl.class, name = ReviewStateTransitionMessage.REVIEW_STATE_TRANSITION), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ShoppingListLineItemAddedMessageImpl.class, name = ShoppingListLineItemAddedMessage.SHOPPING_LIST_LINE_ITEM_ADDED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ShoppingListLineItemRemovedMessageImpl.class, name = ShoppingListLineItemRemovedMessage.SHOPPING_LIST_LINE_ITEM_REMOVED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.StagedQuoteCreatedMessageImpl.class, name = StagedQuoteCreatedMessage.STAGED_QUOTE_CREATED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.StagedQuoteDeletedMessageImpl.class, name = StagedQuoteDeletedMessage.STAGED_QUOTE_DELETED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.StagedQuoteSellerCommentSetMessageImpl.class, name = StagedQuoteSellerCommentSetMessage.STAGED_QUOTE_SELLER_COMMENT_SET), @@ -1111,6 +1113,10 @@ public static Message deepCopy(@Nullable final Message template) { return com.commercetools.api.models.message.ReviewStateTransitionMessage .deepCopy((com.commercetools.api.models.message.ReviewStateTransitionMessage) template); } + if (template instanceof com.commercetools.api.models.message.ShoppingListMessage) { + return com.commercetools.api.models.message.ShoppingListMessage + .deepCopy((com.commercetools.api.models.message.ShoppingListMessage) template); + } if (template instanceof com.commercetools.api.models.message.StagedQuoteCreatedMessage) { return com.commercetools.api.models.message.StagedQuoteCreatedMessage .deepCopy((com.commercetools.api.models.message.StagedQuoteCreatedMessage) template); @@ -2955,6 +2961,22 @@ public static com.commercetools.api.models.message.ReviewStateTransitionMessageB return com.commercetools.api.models.message.ReviewStateTransitionMessageBuilder.of(); } + /** + * builder for shoppingListLineItemAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.ShoppingListLineItemAddedMessageBuilder shoppingListLineItemAddedBuilder() { + return com.commercetools.api.models.message.ShoppingListLineItemAddedMessageBuilder.of(); + } + + /** + * builder for shoppingListLineItemRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.ShoppingListLineItemRemovedMessageBuilder shoppingListLineItemRemovedBuilder() { + return com.commercetools.api.models.message.ShoppingListLineItemRemovedMessageBuilder.of(); + } + /** * builder for stagedQuoteCreated 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 21df59de21..1259841034 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 @@ -867,6 +867,14 @@ public com.commercetools.api.models.message.ReviewStateTransitionMessageBuilder return com.commercetools.api.models.message.ReviewStateTransitionMessageBuilder.of(); } + public com.commercetools.api.models.message.ShoppingListLineItemAddedMessageBuilder shoppingListLineItemAddedBuilder() { + return com.commercetools.api.models.message.ShoppingListLineItemAddedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ShoppingListLineItemRemovedMessageBuilder shoppingListLineItemRemovedBuilder() { + return com.commercetools.api.models.message.ShoppingListLineItemRemovedMessageBuilder.of(); + } + public com.commercetools.api.models.message.StagedQuoteCreatedMessageBuilder stagedQuoteCreatedBuilder() { return com.commercetools.api.models.message.StagedQuoteCreatedMessageBuilder.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 ffc281d178..449e56f0c3 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 @@ -243,6 +243,8 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ReviewCreatedMessagePayloadImpl.class, name = ReviewCreatedMessagePayload.REVIEW_CREATED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ReviewRatingSetMessagePayloadImpl.class, name = ReviewRatingSetMessagePayload.REVIEW_RATING_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ReviewStateTransitionMessagePayloadImpl.class, name = ReviewStateTransitionMessagePayload.REVIEW_STATE_TRANSITION), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ShoppingListLineItemAddedMessagePayloadImpl.class, name = ShoppingListLineItemAddedMessagePayload.SHOPPING_LIST_LINE_ITEM_ADDED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ShoppingListLineItemRemovedMessagePayloadImpl.class, name = ShoppingListLineItemRemovedMessagePayload.SHOPPING_LIST_LINE_ITEM_REMOVED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ShoppingListStoreSetMessagePayloadImpl.class, name = ShoppingListStoreSetMessagePayload.SHOPPING_LIST_STORE_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.StagedQuoteCreatedMessagePayloadImpl.class, name = StagedQuoteCreatedMessagePayload.STAGED_QUOTE_CREATED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.StagedQuoteDeletedMessagePayloadImpl.class, name = StagedQuoteDeletedMessagePayload.STAGED_QUOTE_DELETED), @@ -948,6 +950,10 @@ public static MessagePayload deepCopy(@Nullable final MessagePayload template) { return com.commercetools.api.models.message.ReviewStateTransitionMessagePayload .deepCopy((com.commercetools.api.models.message.ReviewStateTransitionMessagePayload) template); } + if (template instanceof com.commercetools.api.models.message.ShoppingListMessagePayload) { + return com.commercetools.api.models.message.ShoppingListMessagePayload + .deepCopy((com.commercetools.api.models.message.ShoppingListMessagePayload) template); + } if (template instanceof com.commercetools.api.models.message.ShoppingListStoreSetMessagePayload) { return com.commercetools.api.models.message.ShoppingListStoreSetMessagePayload .deepCopy((com.commercetools.api.models.message.ShoppingListStoreSetMessagePayload) template); @@ -2784,6 +2790,22 @@ public static com.commercetools.api.models.message.ReviewStateTransitionMessageP return com.commercetools.api.models.message.ReviewStateTransitionMessagePayloadBuilder.of(); } + /** + * builder for shoppingListLineItemAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.ShoppingListLineItemAddedMessagePayloadBuilder shoppingListLineItemAddedBuilder() { + return com.commercetools.api.models.message.ShoppingListLineItemAddedMessagePayloadBuilder.of(); + } + + /** + * builder for shoppingListLineItemRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.ShoppingListLineItemRemovedMessagePayloadBuilder shoppingListLineItemRemovedBuilder() { + return com.commercetools.api.models.message.ShoppingListLineItemRemovedMessagePayloadBuilder.of(); + } + /** * builder for shoppingListStoreSet 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 feda9a104c..8cc0d17b13 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 @@ -867,6 +867,14 @@ public com.commercetools.api.models.message.ReviewStateTransitionMessagePayloadB return com.commercetools.api.models.message.ReviewStateTransitionMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.ShoppingListLineItemAddedMessagePayloadBuilder shoppingListLineItemAddedBuilder() { + return com.commercetools.api.models.message.ShoppingListLineItemAddedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ShoppingListLineItemRemovedMessagePayloadBuilder shoppingListLineItemRemovedBuilder() { + return com.commercetools.api.models.message.ShoppingListLineItemRemovedMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.ShoppingListStoreSetMessagePayloadBuilder shoppingListStoreSetBuilder() { return com.commercetools.api.models.message.ShoppingListStoreSetMessagePayloadBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessage.java new file mode 100644 index 0000000000..97438c7a7c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessage.java @@ -0,0 +1,160 @@ + +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.shopping_list.ShoppingListLineItem; +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 Add ShoppingListLineItem update action.

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

+ *     ShoppingListLineItemAddedMessage shoppingListLineItemAddedMessage = ShoppingListLineItemAddedMessage.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)
+ *             .lineItem(lineItemBuilder -> lineItemBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShoppingListLineItemAddedMessageImpl.class) +public interface ShoppingListLineItemAddedMessage extends ShoppingListMessage { + + /** + * discriminator value for ShoppingListLineItemAddedMessage + */ + String SHOPPING_LIST_LINE_ITEM_ADDED = "ShoppingListLineItemAdded"; + + /** + *

Line Item that was added to the ShoppingList.

+ * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public ShoppingListLineItem getLineItem(); + + /** + *

Line Item that was added to the ShoppingList.

+ * @param lineItem value to be set + */ + + public void setLineItem(final ShoppingListLineItem lineItem); + + /** + * factory method + * @return instance of ShoppingListLineItemAddedMessage + */ + public static ShoppingListLineItemAddedMessage of() { + return new ShoppingListLineItemAddedMessageImpl(); + } + + /** + * factory method to create a shallow copy ShoppingListLineItemAddedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ShoppingListLineItemAddedMessage of(final ShoppingListLineItemAddedMessage template) { + ShoppingListLineItemAddedMessageImpl instance = new ShoppingListLineItemAddedMessageImpl(); + 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.setLineItem(template.getLineItem()); + return instance; + } + + /** + * factory method to create a deep copy of ShoppingListLineItemAddedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShoppingListLineItemAddedMessage deepCopy(@Nullable final ShoppingListLineItemAddedMessage template) { + if (template == null) { + return null; + } + ShoppingListLineItemAddedMessageImpl instance = new ShoppingListLineItemAddedMessageImpl(); + 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.setLineItem( + com.commercetools.api.models.shopping_list.ShoppingListLineItem.deepCopy(template.getLineItem())); + return instance; + } + + /** + * builder factory method for ShoppingListLineItemAddedMessage + * @return builder + */ + public static ShoppingListLineItemAddedMessageBuilder builder() { + return ShoppingListLineItemAddedMessageBuilder.of(); + } + + /** + * create builder for ShoppingListLineItemAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemAddedMessageBuilder builder(final ShoppingListLineItemAddedMessage template) { + return ShoppingListLineItemAddedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShoppingListLineItemAddedMessage(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/ShoppingListLineItemAddedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessageBuilder.java new file mode 100644 index 0000000000..6aaafd1e6a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessageBuilder.java @@ -0,0 +1,455 @@ + +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; + +/** + * ShoppingListLineItemAddedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShoppingListLineItemAddedMessage shoppingListLineItemAddedMessage = ShoppingListLineItemAddedMessage.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)
+ *             .lineItem(lineItemBuilder -> lineItemBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemAddedMessageBuilder 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 com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder 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 ShoppingListLineItemAddedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Line Item that was added to the ShoppingList.

+ * @param builder function to build the lineItem value + * @return Builder + */ + + public ShoppingListLineItemAddedMessageBuilder lineItem( + Function builder) { + this.lineItem = builder.apply(com.commercetools.api.models.shopping_list.ShoppingListLineItemBuilder.of()) + .build(); + return this; + } + + /** + *

Line Item that was added to the ShoppingList.

+ * @param builder function to build the lineItem value + * @return Builder + */ + + public ShoppingListLineItemAddedMessageBuilder withLineItem( + Function builder) { + this.lineItem = builder.apply(com.commercetools.api.models.shopping_list.ShoppingListLineItemBuilder.of()); + return this; + } + + /** + *

Line Item that was added to the ShoppingList.

+ * @param lineItem value to be set + * @return Builder + */ + + public ShoppingListLineItemAddedMessageBuilder lineItem( + final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + 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; + } + + /** + *

Line Item that was added to the ShoppingList.

+ * @return lineItem + */ + + public com.commercetools.api.models.shopping_list.ShoppingListLineItem getLineItem() { + return this.lineItem; + } + + /** + * builds ShoppingListLineItemAddedMessage with checking for non-null required values + * @return ShoppingListLineItemAddedMessage + */ + public ShoppingListLineItemAddedMessage build() { + Objects.requireNonNull(id, ShoppingListLineItemAddedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ShoppingListLineItemAddedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ShoppingListLineItemAddedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ShoppingListLineItemAddedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, ShoppingListLineItemAddedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ShoppingListLineItemAddedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ShoppingListLineItemAddedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(lineItem, ShoppingListLineItemAddedMessage.class + ": lineItem is missing"); + return new ShoppingListLineItemAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, lineItem); + } + + /** + * builds ShoppingListLineItemAddedMessage without checking for non-null required values + * @return ShoppingListLineItemAddedMessage + */ + public ShoppingListLineItemAddedMessage buildUnchecked() { + return new ShoppingListLineItemAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, lineItem); + } + + /** + * factory method for an instance of ShoppingListLineItemAddedMessageBuilder + * @return builder + */ + public static ShoppingListLineItemAddedMessageBuilder of() { + return new ShoppingListLineItemAddedMessageBuilder(); + } + + /** + * create builder for ShoppingListLineItemAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemAddedMessageBuilder of(final ShoppingListLineItemAddedMessage template) { + ShoppingListLineItemAddedMessageBuilder builder = new ShoppingListLineItemAddedMessageBuilder(); + 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.lineItem = template.getLineItem(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessageImpl.java new file mode 100644 index 0000000000..c3c62d028b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessageImpl.java @@ -0,0 +1,297 @@ + +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 Add ShoppingListLineItem update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemAddedMessageImpl implements ShoppingListLineItemAddedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem; + + /** + * create instance with all properties + */ + @JsonCreator + ShoppingListLineItemAddedMessageImpl(@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("lineItem") final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + 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.lineItem = lineItem; + this.type = SHOPPING_LIST_LINE_ITEM_ADDED; + } + + /** + * create empty instance + */ + public ShoppingListLineItemAddedMessageImpl() { + this.type = SHOPPING_LIST_LINE_ITEM_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; + } + + /** + *

Line Item that was added to the ShoppingList.

+ */ + + public com.commercetools.api.models.shopping_list.ShoppingListLineItem getLineItem() { + return this.lineItem; + } + + 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 setLineItem(final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShoppingListLineItemAddedMessageImpl that = (ShoppingListLineItemAddedMessageImpl) 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(lineItem, that.lineItem) + .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(lineItem, that.lineItem) + .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(lineItem) + .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("lineItem", lineItem) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayload.java new file mode 100644 index 0000000000..2def0dadc7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayload.java @@ -0,0 +1,134 @@ + +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.shopping_list.ShoppingListLineItem; +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 Add ShoppingListLineItem update action.

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

+ *     ShoppingListLineItemAddedMessagePayload shoppingListLineItemAddedMessagePayload = ShoppingListLineItemAddedMessagePayload.builder()
+ *             .lineItem(lineItemBuilder -> lineItemBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShoppingListLineItemAddedMessagePayloadImpl.class) +public interface ShoppingListLineItemAddedMessagePayload extends ShoppingListMessagePayload { + + /** + * discriminator value for ShoppingListLineItemAddedMessagePayload + */ + String SHOPPING_LIST_LINE_ITEM_ADDED = "ShoppingListLineItemAdded"; + + /** + *

Line Item that was added to the ShoppingList.

+ * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public ShoppingListLineItem getLineItem(); + + /** + *

Line Item that was added to the ShoppingList.

+ * @param lineItem value to be set + */ + + public void setLineItem(final ShoppingListLineItem lineItem); + + /** + * factory method + * @return instance of ShoppingListLineItemAddedMessagePayload + */ + public static ShoppingListLineItemAddedMessagePayload of() { + return new ShoppingListLineItemAddedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ShoppingListLineItemAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ShoppingListLineItemAddedMessagePayload of(final ShoppingListLineItemAddedMessagePayload template) { + ShoppingListLineItemAddedMessagePayloadImpl instance = new ShoppingListLineItemAddedMessagePayloadImpl(); + instance.setLineItem(template.getLineItem()); + return instance; + } + + /** + * factory method to create a deep copy of ShoppingListLineItemAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShoppingListLineItemAddedMessagePayload deepCopy( + @Nullable final ShoppingListLineItemAddedMessagePayload template) { + if (template == null) { + return null; + } + ShoppingListLineItemAddedMessagePayloadImpl instance = new ShoppingListLineItemAddedMessagePayloadImpl(); + instance.setLineItem( + com.commercetools.api.models.shopping_list.ShoppingListLineItem.deepCopy(template.getLineItem())); + return instance; + } + + /** + * builder factory method for ShoppingListLineItemAddedMessagePayload + * @return builder + */ + public static ShoppingListLineItemAddedMessagePayloadBuilder builder() { + return ShoppingListLineItemAddedMessagePayloadBuilder.of(); + } + + /** + * create builder for ShoppingListLineItemAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemAddedMessagePayloadBuilder builder( + final ShoppingListLineItemAddedMessagePayload template) { + return ShoppingListLineItemAddedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShoppingListLineItemAddedMessagePayload( + 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/ShoppingListLineItemAddedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayloadBuilder.java new file mode 100644 index 0000000000..ea02616b4c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayloadBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShoppingListLineItemAddedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShoppingListLineItemAddedMessagePayload shoppingListLineItemAddedMessagePayload = ShoppingListLineItemAddedMessagePayload.builder()
+ *             .lineItem(lineItemBuilder -> lineItemBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemAddedMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem; + + /** + *

Line Item that was added to the ShoppingList.

+ * @param builder function to build the lineItem value + * @return Builder + */ + + public ShoppingListLineItemAddedMessagePayloadBuilder lineItem( + Function builder) { + this.lineItem = builder.apply(com.commercetools.api.models.shopping_list.ShoppingListLineItemBuilder.of()) + .build(); + return this; + } + + /** + *

Line Item that was added to the ShoppingList.

+ * @param builder function to build the lineItem value + * @return Builder + */ + + public ShoppingListLineItemAddedMessagePayloadBuilder withLineItem( + Function builder) { + this.lineItem = builder.apply(com.commercetools.api.models.shopping_list.ShoppingListLineItemBuilder.of()); + return this; + } + + /** + *

Line Item that was added to the ShoppingList.

+ * @param lineItem value to be set + * @return Builder + */ + + public ShoppingListLineItemAddedMessagePayloadBuilder lineItem( + final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + return this; + } + + /** + *

Line Item that was added to the ShoppingList.

+ * @return lineItem + */ + + public com.commercetools.api.models.shopping_list.ShoppingListLineItem getLineItem() { + return this.lineItem; + } + + /** + * builds ShoppingListLineItemAddedMessagePayload with checking for non-null required values + * @return ShoppingListLineItemAddedMessagePayload + */ + public ShoppingListLineItemAddedMessagePayload build() { + Objects.requireNonNull(lineItem, ShoppingListLineItemAddedMessagePayload.class + ": lineItem is missing"); + return new ShoppingListLineItemAddedMessagePayloadImpl(lineItem); + } + + /** + * builds ShoppingListLineItemAddedMessagePayload without checking for non-null required values + * @return ShoppingListLineItemAddedMessagePayload + */ + public ShoppingListLineItemAddedMessagePayload buildUnchecked() { + return new ShoppingListLineItemAddedMessagePayloadImpl(lineItem); + } + + /** + * factory method for an instance of ShoppingListLineItemAddedMessagePayloadBuilder + * @return builder + */ + public static ShoppingListLineItemAddedMessagePayloadBuilder of() { + return new ShoppingListLineItemAddedMessagePayloadBuilder(); + } + + /** + * create builder for ShoppingListLineItemAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemAddedMessagePayloadBuilder of( + final ShoppingListLineItemAddedMessagePayload template) { + ShoppingListLineItemAddedMessagePayloadBuilder builder = new ShoppingListLineItemAddedMessagePayloadBuilder(); + builder.lineItem = template.getLineItem(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayloadImpl.java new file mode 100644 index 0000000000..fbf0348c0d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayloadImpl.java @@ -0,0 +1,95 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Add ShoppingListLineItem update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemAddedMessagePayloadImpl implements ShoppingListLineItemAddedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem; + + /** + * create instance with all properties + */ + @JsonCreator + ShoppingListLineItemAddedMessagePayloadImpl( + @JsonProperty("lineItem") final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + this.type = SHOPPING_LIST_LINE_ITEM_ADDED; + } + + /** + * create empty instance + */ + public ShoppingListLineItemAddedMessagePayloadImpl() { + this.type = SHOPPING_LIST_LINE_ITEM_ADDED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

Line Item that was added to the ShoppingList.

+ */ + + public com.commercetools.api.models.shopping_list.ShoppingListLineItem getLineItem() { + return this.lineItem; + } + + public void setLineItem(final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShoppingListLineItemAddedMessagePayloadImpl that = (ShoppingListLineItemAddedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(lineItem, that.lineItem) + .append(type, that.type) + .append(lineItem, that.lineItem) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(lineItem).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("lineItem", lineItem) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessage.java new file mode 100644 index 0000000000..822abd1fe2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessage.java @@ -0,0 +1,161 @@ + +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.shopping_list.ShoppingListLineItem; +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 Remove ShoppingListLineItem update action.

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

+ *     ShoppingListLineItemRemovedMessage shoppingListLineItemRemovedMessage = ShoppingListLineItemRemovedMessage.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)
+ *             .lineItem(lineItemBuilder -> lineItemBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShoppingListLineItemRemovedMessageImpl.class) +public interface ShoppingListLineItemRemovedMessage extends ShoppingListMessage { + + /** + * discriminator value for ShoppingListLineItemRemovedMessage + */ + String SHOPPING_LIST_LINE_ITEM_REMOVED = "ShoppingListLineItemRemoved"; + + /** + *

Line Item that was removed from the ShoppingList.

+ * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public ShoppingListLineItem getLineItem(); + + /** + *

Line Item that was removed from the ShoppingList.

+ * @param lineItem value to be set + */ + + public void setLineItem(final ShoppingListLineItem lineItem); + + /** + * factory method + * @return instance of ShoppingListLineItemRemovedMessage + */ + public static ShoppingListLineItemRemovedMessage of() { + return new ShoppingListLineItemRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy ShoppingListLineItemRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ShoppingListLineItemRemovedMessage of(final ShoppingListLineItemRemovedMessage template) { + ShoppingListLineItemRemovedMessageImpl instance = new ShoppingListLineItemRemovedMessageImpl(); + 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.setLineItem(template.getLineItem()); + return instance; + } + + /** + * factory method to create a deep copy of ShoppingListLineItemRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShoppingListLineItemRemovedMessage deepCopy( + @Nullable final ShoppingListLineItemRemovedMessage template) { + if (template == null) { + return null; + } + ShoppingListLineItemRemovedMessageImpl instance = new ShoppingListLineItemRemovedMessageImpl(); + 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.setLineItem( + com.commercetools.api.models.shopping_list.ShoppingListLineItem.deepCopy(template.getLineItem())); + return instance; + } + + /** + * builder factory method for ShoppingListLineItemRemovedMessage + * @return builder + */ + public static ShoppingListLineItemRemovedMessageBuilder builder() { + return ShoppingListLineItemRemovedMessageBuilder.of(); + } + + /** + * create builder for ShoppingListLineItemRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemRemovedMessageBuilder builder(final ShoppingListLineItemRemovedMessage template) { + return ShoppingListLineItemRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShoppingListLineItemRemovedMessage(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/ShoppingListLineItemRemovedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessageBuilder.java new file mode 100644 index 0000000000..37361afca4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessageBuilder.java @@ -0,0 +1,457 @@ + +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; + +/** + * ShoppingListLineItemRemovedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShoppingListLineItemRemovedMessage shoppingListLineItemRemovedMessage = ShoppingListLineItemRemovedMessage.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)
+ *             .lineItem(lineItemBuilder -> lineItemBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemRemovedMessageBuilder 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 com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem; + + /** + *

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

+ * @param id value to be set + * @return Builder + */ + + public ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder 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 ShoppingListLineItemRemovedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ * @param builder function to build the lineItem value + * @return Builder + */ + + public ShoppingListLineItemRemovedMessageBuilder lineItem( + Function builder) { + this.lineItem = builder.apply(com.commercetools.api.models.shopping_list.ShoppingListLineItemBuilder.of()) + .build(); + return this; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ * @param builder function to build the lineItem value + * @return Builder + */ + + public ShoppingListLineItemRemovedMessageBuilder withLineItem( + Function builder) { + this.lineItem = builder.apply(com.commercetools.api.models.shopping_list.ShoppingListLineItemBuilder.of()); + return this; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ * @param lineItem value to be set + * @return Builder + */ + + public ShoppingListLineItemRemovedMessageBuilder lineItem( + final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + 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; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ * @return lineItem + */ + + public com.commercetools.api.models.shopping_list.ShoppingListLineItem getLineItem() { + return this.lineItem; + } + + /** + * builds ShoppingListLineItemRemovedMessage with checking for non-null required values + * @return ShoppingListLineItemRemovedMessage + */ + public ShoppingListLineItemRemovedMessage build() { + Objects.requireNonNull(id, ShoppingListLineItemRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ShoppingListLineItemRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ShoppingListLineItemRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ShoppingListLineItemRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ShoppingListLineItemRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ShoppingListLineItemRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ShoppingListLineItemRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(lineItem, ShoppingListLineItemRemovedMessage.class + ": lineItem is missing"); + return new ShoppingListLineItemRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, lineItem); + } + + /** + * builds ShoppingListLineItemRemovedMessage without checking for non-null required values + * @return ShoppingListLineItemRemovedMessage + */ + public ShoppingListLineItemRemovedMessage buildUnchecked() { + return new ShoppingListLineItemRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, lineItem); + } + + /** + * factory method for an instance of ShoppingListLineItemRemovedMessageBuilder + * @return builder + */ + public static ShoppingListLineItemRemovedMessageBuilder of() { + return new ShoppingListLineItemRemovedMessageBuilder(); + } + + /** + * create builder for ShoppingListLineItemRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemRemovedMessageBuilder of(final ShoppingListLineItemRemovedMessage template) { + ShoppingListLineItemRemovedMessageBuilder builder = new ShoppingListLineItemRemovedMessageBuilder(); + 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.lineItem = template.getLineItem(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessageImpl.java new file mode 100644 index 0000000000..8ef5ae1f63 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessageImpl.java @@ -0,0 +1,297 @@ + +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 Remove ShoppingListLineItem update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemRemovedMessageImpl implements ShoppingListLineItemRemovedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem; + + /** + * create instance with all properties + */ + @JsonCreator + ShoppingListLineItemRemovedMessageImpl(@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("lineItem") final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + 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.lineItem = lineItem; + this.type = SHOPPING_LIST_LINE_ITEM_REMOVED; + } + + /** + * create empty instance + */ + public ShoppingListLineItemRemovedMessageImpl() { + this.type = SHOPPING_LIST_LINE_ITEM_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; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ */ + + public com.commercetools.api.models.shopping_list.ShoppingListLineItem getLineItem() { + return this.lineItem; + } + + 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 setLineItem(final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShoppingListLineItemRemovedMessageImpl that = (ShoppingListLineItemRemovedMessageImpl) 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(lineItem, that.lineItem) + .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(lineItem, that.lineItem) + .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(lineItem) + .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("lineItem", lineItem) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayload.java new file mode 100644 index 0000000000..d44cf52306 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayload.java @@ -0,0 +1,135 @@ + +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.shopping_list.ShoppingListLineItem; +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 Remove ShoppingListLineItem update action.

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

+ *     ShoppingListLineItemRemovedMessagePayload shoppingListLineItemRemovedMessagePayload = ShoppingListLineItemRemovedMessagePayload.builder()
+ *             .lineItem(lineItemBuilder -> lineItemBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShoppingListLineItemRemovedMessagePayloadImpl.class) +public interface ShoppingListLineItemRemovedMessagePayload extends ShoppingListMessagePayload { + + /** + * discriminator value for ShoppingListLineItemRemovedMessagePayload + */ + String SHOPPING_LIST_LINE_ITEM_REMOVED = "ShoppingListLineItemRemoved"; + + /** + *

Line Item that was removed from the ShoppingList.

+ * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public ShoppingListLineItem getLineItem(); + + /** + *

Line Item that was removed from the ShoppingList.

+ * @param lineItem value to be set + */ + + public void setLineItem(final ShoppingListLineItem lineItem); + + /** + * factory method + * @return instance of ShoppingListLineItemRemovedMessagePayload + */ + public static ShoppingListLineItemRemovedMessagePayload of() { + return new ShoppingListLineItemRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ShoppingListLineItemRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ShoppingListLineItemRemovedMessagePayload of( + final ShoppingListLineItemRemovedMessagePayload template) { + ShoppingListLineItemRemovedMessagePayloadImpl instance = new ShoppingListLineItemRemovedMessagePayloadImpl(); + instance.setLineItem(template.getLineItem()); + return instance; + } + + /** + * factory method to create a deep copy of ShoppingListLineItemRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShoppingListLineItemRemovedMessagePayload deepCopy( + @Nullable final ShoppingListLineItemRemovedMessagePayload template) { + if (template == null) { + return null; + } + ShoppingListLineItemRemovedMessagePayloadImpl instance = new ShoppingListLineItemRemovedMessagePayloadImpl(); + instance.setLineItem( + com.commercetools.api.models.shopping_list.ShoppingListLineItem.deepCopy(template.getLineItem())); + return instance; + } + + /** + * builder factory method for ShoppingListLineItemRemovedMessagePayload + * @return builder + */ + public static ShoppingListLineItemRemovedMessagePayloadBuilder builder() { + return ShoppingListLineItemRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for ShoppingListLineItemRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemRemovedMessagePayloadBuilder builder( + final ShoppingListLineItemRemovedMessagePayload template) { + return ShoppingListLineItemRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShoppingListLineItemRemovedMessagePayload( + 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/ShoppingListLineItemRemovedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayloadBuilder.java new file mode 100644 index 0000000000..c814bdae8e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayloadBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShoppingListLineItemRemovedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShoppingListLineItemRemovedMessagePayload shoppingListLineItemRemovedMessagePayload = ShoppingListLineItemRemovedMessagePayload.builder()
+ *             .lineItem(lineItemBuilder -> lineItemBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemRemovedMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem; + + /** + *

Line Item that was removed from the ShoppingList.

+ * @param builder function to build the lineItem value + * @return Builder + */ + + public ShoppingListLineItemRemovedMessagePayloadBuilder lineItem( + Function builder) { + this.lineItem = builder.apply(com.commercetools.api.models.shopping_list.ShoppingListLineItemBuilder.of()) + .build(); + return this; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ * @param builder function to build the lineItem value + * @return Builder + */ + + public ShoppingListLineItemRemovedMessagePayloadBuilder withLineItem( + Function builder) { + this.lineItem = builder.apply(com.commercetools.api.models.shopping_list.ShoppingListLineItemBuilder.of()); + return this; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ * @param lineItem value to be set + * @return Builder + */ + + public ShoppingListLineItemRemovedMessagePayloadBuilder lineItem( + final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + return this; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ * @return lineItem + */ + + public com.commercetools.api.models.shopping_list.ShoppingListLineItem getLineItem() { + return this.lineItem; + } + + /** + * builds ShoppingListLineItemRemovedMessagePayload with checking for non-null required values + * @return ShoppingListLineItemRemovedMessagePayload + */ + public ShoppingListLineItemRemovedMessagePayload build() { + Objects.requireNonNull(lineItem, ShoppingListLineItemRemovedMessagePayload.class + ": lineItem is missing"); + return new ShoppingListLineItemRemovedMessagePayloadImpl(lineItem); + } + + /** + * builds ShoppingListLineItemRemovedMessagePayload without checking for non-null required values + * @return ShoppingListLineItemRemovedMessagePayload + */ + public ShoppingListLineItemRemovedMessagePayload buildUnchecked() { + return new ShoppingListLineItemRemovedMessagePayloadImpl(lineItem); + } + + /** + * factory method for an instance of ShoppingListLineItemRemovedMessagePayloadBuilder + * @return builder + */ + public static ShoppingListLineItemRemovedMessagePayloadBuilder of() { + return new ShoppingListLineItemRemovedMessagePayloadBuilder(); + } + + /** + * create builder for ShoppingListLineItemRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemRemovedMessagePayloadBuilder of( + final ShoppingListLineItemRemovedMessagePayload template) { + ShoppingListLineItemRemovedMessagePayloadBuilder builder = new ShoppingListLineItemRemovedMessagePayloadBuilder(); + builder.lineItem = template.getLineItem(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayloadImpl.java new file mode 100644 index 0000000000..6c5b6ea06e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayloadImpl.java @@ -0,0 +1,96 @@ + +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 Remove ShoppingListLineItem update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemRemovedMessagePayloadImpl + implements ShoppingListLineItemRemovedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem; + + /** + * create instance with all properties + */ + @JsonCreator + ShoppingListLineItemRemovedMessagePayloadImpl( + @JsonProperty("lineItem") final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + this.type = SHOPPING_LIST_LINE_ITEM_REMOVED; + } + + /** + * create empty instance + */ + public ShoppingListLineItemRemovedMessagePayloadImpl() { + this.type = SHOPPING_LIST_LINE_ITEM_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

Line Item that was removed from the ShoppingList.

+ */ + + public com.commercetools.api.models.shopping_list.ShoppingListLineItem getLineItem() { + return this.lineItem; + } + + public void setLineItem(final com.commercetools.api.models.shopping_list.ShoppingListLineItem lineItem) { + this.lineItem = lineItem; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShoppingListLineItemRemovedMessagePayloadImpl that = (ShoppingListLineItemRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(lineItem, that.lineItem) + .append(type, that.type) + .append(lineItem, that.lineItem) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(lineItem).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("lineItem", lineItem) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessage.java new file mode 100644 index 0000000000..6834e660b3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessage.java @@ -0,0 +1,93 @@ + +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; + +/** + * ShoppingListMessage + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShoppingListMessage shoppingListMessage = ShoppingListMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ShoppingListMessage extends Message { + + /** + * factory method to create a deep copy of ShoppingListMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShoppingListMessage deepCopy(@Nullable final ShoppingListMessage template) { + if (template == null) { + return null; + } + if (template instanceof com.commercetools.api.models.message.ShoppingListLineItemAddedMessage) { + return com.commercetools.api.models.message.ShoppingListLineItemAddedMessage + .deepCopy((com.commercetools.api.models.message.ShoppingListLineItemAddedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ShoppingListLineItemRemovedMessage) { + return com.commercetools.api.models.message.ShoppingListLineItemRemovedMessage + .deepCopy((com.commercetools.api.models.message.ShoppingListLineItemRemovedMessage) template); + } + ShoppingListMessageImpl instance = new ShoppingListMessageImpl(); + 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())); + return instance; + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShoppingListMessage(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/ShoppingListMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessageImpl.java new file mode 100644 index 0000000000..2acc942d78 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessageImpl.java @@ -0,0 +1,275 @@ + +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; + +/** + * ShoppingListMessage + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListMessageImpl implements ShoppingListMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + /** + * create instance with all properties + */ + @JsonCreator + ShoppingListMessageImpl(@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("type") final String type, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.type = type; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + /** + * create empty instance + */ + public ShoppingListMessageImpl() { + } + + /** + *

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; + } + + 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShoppingListMessageImpl that = (ShoppingListMessageImpl) 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(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) + .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) + .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) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessagePayload.java new file mode 100644 index 0000000000..d64392068f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessagePayload.java @@ -0,0 +1,74 @@ + +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; + +/** + * ShoppingListMessagePayload + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ShoppingListMessagePayload shoppingListMessagePayload = ShoppingListMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ShoppingListMessagePayload extends MessagePayload { + + /** + * factory method to create a deep copy of ShoppingListMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShoppingListMessagePayload deepCopy(@Nullable final ShoppingListMessagePayload template) { + if (template == null) { + return null; + } + if (template instanceof com.commercetools.api.models.message.ShoppingListLineItemAddedMessagePayload) { + return com.commercetools.api.models.message.ShoppingListLineItemAddedMessagePayload + .deepCopy((com.commercetools.api.models.message.ShoppingListLineItemAddedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ShoppingListLineItemRemovedMessagePayload) { + return com.commercetools.api.models.message.ShoppingListLineItemRemovedMessagePayload.deepCopy( + (com.commercetools.api.models.message.ShoppingListLineItemRemovedMessagePayload) template); + } + ShoppingListMessagePayloadImpl instance = new ShoppingListMessagePayloadImpl(); + return instance; + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShoppingListMessagePayload(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/ShoppingListMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessagePayloadImpl.java new file mode 100644 index 0000000000..c8e0983e01 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ShoppingListMessagePayloadImpl.java @@ -0,0 +1,72 @@ + +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; + +/** + * ShoppingListMessagePayload + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListMessagePayloadImpl implements ShoppingListMessagePayload, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + ShoppingListMessagePayloadImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public ShoppingListMessagePayloadImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShoppingListMessagePayloadImpl that = (ShoppingListMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java index 15b643fb44..fcbd90732b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemAction.java @@ -18,6 +18,7 @@ /** *

The ProductVariant to be included in the ShoppingListLineItem must be specified using the productID and variantID, or by the sku. If the ShoppingList already contains a ShoppingListLineItem for the same Product Variant with the same Custom Fields, then only the quantity of the existing ShoppingListLineItem is increased. A ShoppingListLineItem with an empty variantId is not considered the same as a ShoppingListLineItem with a variantId currently referring to the Master Variant.

+ *

Produces the Shopping List Line Item Added Message.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java index ae2955d99f..c2d31b6366 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListAddLineItemActionImpl.java @@ -18,6 +18,7 @@ /** *

The ProductVariant to be included in the ShoppingListLineItem must be specified using the productID and variantID, or by the sku. If the ShoppingList already contains a ShoppingListLineItem for the same Product Variant with the same Custom Fields, then only the quantity of the existing ShoppingListLineItem is increased. A ShoppingListLineItem with an empty variantId is not considered the same as a ShoppingListLineItem with a variantId currently referring to the Master Variant.

+ *

Produces the Shopping List Line Item Added Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ShoppingListAddLineItemActionImpl implements ShoppingListAddLineItemAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListRemoveLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListRemoveLineItemAction.java index 4eff3d9f5a..40db69382c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListRemoveLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListRemoveLineItemAction.java @@ -13,7 +13,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * ShoppingListRemoveLineItemAction + *

Produces the Shopping List Line Item Removed Message.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListRemoveLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListRemoveLineItemActionImpl.java index d631557fe0..1b84b63ad9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListRemoveLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListRemoveLineItemActionImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * ShoppingListRemoveLineItemAction + *

Produces the Shopping List Line Item Removed Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ShoppingListRemoveLineItemActionImpl implements ShoppingListRemoveLineItemAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/MessageSubscriptionResourceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/MessageSubscriptionResourceTypeId.java index 869276854c..9af679dd9b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/MessageSubscriptionResourceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/MessageSubscriptionResourceTypeId.java @@ -71,6 +71,9 @@ public interface MessageSubscriptionResourceTypeId extends JsonEnum {

Messages related to Reviews.

*/ MessageSubscriptionResourceTypeId REVIEW = MessageSubscriptionResourceTypeIdEnum.REVIEW; /** +

Messages related to Shopping Lists.

*/ + MessageSubscriptionResourceTypeId SHOPPING_LIST = MessageSubscriptionResourceTypeIdEnum.SHOPPING_LIST; + /**

Messages related to Staged Quotes.

*/ MessageSubscriptionResourceTypeId STAGED_QUOTE = MessageSubscriptionResourceTypeIdEnum.STAGED_QUOTE; /** @@ -174,6 +177,11 @@ enum MessageSubscriptionResourceTypeIdEnum implements MessageSubscriptionResourc */ REVIEW("review"), + /** + * shopping-list + */ + SHOPPING_LIST("shopping-list"), + /** * staged-quote */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListLineItemAddedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListLineItemAddedMessageExpansionBuilderDsl.java new file mode 100644 index 0000000000..364eaf6db8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListLineItemAddedMessageExpansionBuilderDsl.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 ShoppingListLineItemAddedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ShoppingListLineItemAddedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ShoppingListLineItemAddedMessageExpansionBuilderDsl of() { + return new ShoppingListLineItemAddedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ShoppingListLineItemAddedMessageExpansionBuilderDsl of(final List path) { + return new ShoppingListLineItemAddedMessageExpansionBuilderDsl(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.shopping_list.ShoppingListLineItemExpansionBuilderDsl lineItem() { + return com.commercetools.api.predicates.expansion.shopping_list.ShoppingListLineItemExpansionBuilderDsl + .of(appendOne(path, "lineItem")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListLineItemRemovedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListLineItemRemovedMessageExpansionBuilderDsl.java new file mode 100644 index 0000000000..b950ad6f4e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListLineItemRemovedMessageExpansionBuilderDsl.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 ShoppingListLineItemRemovedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ShoppingListLineItemRemovedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ShoppingListLineItemRemovedMessageExpansionBuilderDsl of() { + return new ShoppingListLineItemRemovedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ShoppingListLineItemRemovedMessageExpansionBuilderDsl of(final List path) { + return new ShoppingListLineItemRemovedMessageExpansionBuilderDsl(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.shopping_list.ShoppingListLineItemExpansionBuilderDsl lineItem() { + return com.commercetools.api.predicates.expansion.shopping_list.ShoppingListLineItemExpansionBuilderDsl + .of(appendOne(path, "lineItem")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListMessageExpansionBuilderDsl.java new file mode 100644 index 0000000000..36ae38d513 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ShoppingListMessageExpansionBuilderDsl.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 ShoppingListMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ShoppingListMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ShoppingListMessageExpansionBuilderDsl of() { + return new ShoppingListMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ShoppingListMessageExpansionBuilderDsl of(final List path) { + return new ShoppingListMessageExpansionBuilderDsl(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/query/message/MessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java index 3fbf0521af..c6abfcb5b9 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 @@ -1271,6 +1271,13 @@ public CombinationQueryPredicate asReviewStateTra MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asShoppingListMessagePayload( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.ShoppingListMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asShoppingListStoreSet( Function> fn) { return new CombinationQueryPredicate<>( 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 871ab6f20b..67e9824e13 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 @@ -1293,6 +1293,13 @@ public CombinationQueryPredicate asReviewStateTransition MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asShoppingListMessage( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.ShoppingListMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asStagedQuoteCreated( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 0000000000..07dbb1d21f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl { + public ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl() { + } + + public static ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl of() { + return new ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lineItem( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lineItem")) + .inner(fn.apply( + com.commercetools.api.predicates.query.shopping_list.ShoppingListLineItemQueryBuilderDsl.of())), + ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemAddedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemAddedMessageQueryBuilderDsl.java new file mode 100644 index 0000000000..30fe389a41 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemAddedMessageQueryBuilderDsl.java @@ -0,0 +1,104 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ShoppingListLineItemAddedMessageQueryBuilderDsl { + public ShoppingListLineItemAddedMessageQueryBuilderDsl() { + } + + public static ShoppingListLineItemAddedMessageQueryBuilderDsl of() { + return new ShoppingListLineItemAddedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemAddedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemAddedMessageQueryBuilderDsl::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())), + ShoppingListLineItemAddedMessageQueryBuilderDsl::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())), + ShoppingListLineItemAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemAddedMessageQueryBuilderDsl::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())), + ShoppingListLineItemAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemAddedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemAddedMessageQueryBuilderDsl::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())), + ShoppingListLineItemAddedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate lineItem( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lineItem")) + .inner(fn.apply( + com.commercetools.api.predicates.query.shopping_list.ShoppingListLineItemQueryBuilderDsl.of())), + ShoppingListLineItemAddedMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 0000000000..9225f9a029 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl { + public ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl() { + } + + public static ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl of() { + return new ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lineItem( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lineItem")) + .inner(fn.apply( + com.commercetools.api.predicates.query.shopping_list.ShoppingListLineItemQueryBuilderDsl.of())), + ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemRemovedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemRemovedMessageQueryBuilderDsl.java new file mode 100644 index 0000000000..737de77c0a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListLineItemRemovedMessageQueryBuilderDsl.java @@ -0,0 +1,104 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ShoppingListLineItemRemovedMessageQueryBuilderDsl { + public ShoppingListLineItemRemovedMessageQueryBuilderDsl() { + } + + public static ShoppingListLineItemRemovedMessageQueryBuilderDsl of() { + return new ShoppingListLineItemRemovedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemRemovedMessageQueryBuilderDsl::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())), + ShoppingListLineItemRemovedMessageQueryBuilderDsl::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())), + ShoppingListLineItemRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemRemovedMessageQueryBuilderDsl::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())), + ShoppingListLineItemRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemRemovedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ShoppingListLineItemRemovedMessageQueryBuilderDsl::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())), + ShoppingListLineItemRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate lineItem( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lineItem")) + .inner(fn.apply( + com.commercetools.api.predicates.query.shopping_list.ShoppingListLineItemQueryBuilderDsl.of())), + ShoppingListLineItemRemovedMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListMessagePayloadQueryBuilderDsl.java new file mode 100644 index 0000000000..50cc850e16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ShoppingListMessagePayloadQueryBuilderDsl { + public ShoppingListMessagePayloadQueryBuilderDsl() { + } + + public static ShoppingListMessagePayloadQueryBuilderDsl of() { + return new ShoppingListMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ShoppingListMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asShoppingListLineItemAdded( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ShoppingListLineItemAddedMessagePayloadQueryBuilderDsl.of()), + ShoppingListMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asShoppingListLineItemRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ShoppingListLineItemRemovedMessagePayloadQueryBuilderDsl + .of()), + ShoppingListMessagePayloadQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListMessageQueryBuilderDsl.java new file mode 100644 index 0000000000..b7b7704fd0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ShoppingListMessageQueryBuilderDsl.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ShoppingListMessageQueryBuilderDsl { + public ShoppingListMessageQueryBuilderDsl() { + } + + public static ShoppingListMessageQueryBuilderDsl of() { + return new ShoppingListMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ShoppingListMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ShoppingListMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ShoppingListMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ShoppingListMessageQueryBuilderDsl::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())), + ShoppingListMessageQueryBuilderDsl::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())), + ShoppingListMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ShoppingListMessageQueryBuilderDsl::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())), + ShoppingListMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ShoppingListMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ShoppingListMessageQueryBuilderDsl::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())), + ShoppingListMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asShoppingListLineItemAdded( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ShoppingListLineItemAddedMessageQueryBuilderDsl.of()), + ShoppingListMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asShoppingListLineItemRemoved( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ShoppingListLineItemRemovedMessageQueryBuilderDsl.of()), + ShoppingListMessageQueryBuilderDsl::of); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayloadTest.java new file mode 100644 index 0000000000..c4b9f5e840 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessagePayloadTest.java @@ -0,0 +1,39 @@ + +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 ShoppingListLineItemAddedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ShoppingListLineItemAddedMessagePayloadBuilder builder) { + ShoppingListLineItemAddedMessagePayload shoppingListLineItemAddedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(shoppingListLineItemAddedMessagePayload) + .isInstanceOf(ShoppingListLineItemAddedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ShoppingListLineItemAddedMessagePayload.builder() + .lineItem(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()) } }; + } + + @Test + public void lineItem() { + ShoppingListLineItemAddedMessagePayload value = ShoppingListLineItemAddedMessagePayload.of(); + value.setLineItem(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessageTest.java new file mode 100644 index 0000000000..d8892af665 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemAddedMessageTest.java @@ -0,0 +1,38 @@ + +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 ShoppingListLineItemAddedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ShoppingListLineItemAddedMessageBuilder builder) { + ShoppingListLineItemAddedMessage shoppingListLineItemAddedMessage = builder.buildUnchecked(); + Assertions.assertThat(shoppingListLineItemAddedMessage).isInstanceOf(ShoppingListLineItemAddedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ShoppingListLineItemAddedMessage.builder() + .lineItem(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()) } }; + } + + @Test + public void lineItem() { + ShoppingListLineItemAddedMessage value = ShoppingListLineItemAddedMessage.of(); + value.setLineItem(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayloadTest.java new file mode 100644 index 0000000000..02c10a68e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessagePayloadTest.java @@ -0,0 +1,39 @@ + +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 ShoppingListLineItemRemovedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ShoppingListLineItemRemovedMessagePayloadBuilder builder) { + ShoppingListLineItemRemovedMessagePayload shoppingListLineItemRemovedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(shoppingListLineItemRemovedMessagePayload) + .isInstanceOf(ShoppingListLineItemRemovedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ShoppingListLineItemRemovedMessagePayload.builder() + .lineItem(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()) } }; + } + + @Test + public void lineItem() { + ShoppingListLineItemRemovedMessagePayload value = ShoppingListLineItemRemovedMessagePayload.of(); + value.setLineItem(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessageTest.java new file mode 100644 index 0000000000..14dc80a96c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ShoppingListLineItemRemovedMessageTest.java @@ -0,0 +1,39 @@ + +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 ShoppingListLineItemRemovedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ShoppingListLineItemRemovedMessageBuilder builder) { + ShoppingListLineItemRemovedMessage shoppingListLineItemRemovedMessage = builder.buildUnchecked(); + Assertions.assertThat(shoppingListLineItemRemovedMessage) + .isInstanceOf(ShoppingListLineItemRemovedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ShoppingListLineItemRemovedMessage.builder() + .lineItem(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()) } }; + } + + @Test + public void lineItem() { + ShoppingListLineItemRemovedMessage value = ShoppingListLineItemRemovedMessage.of(); + value.setLineItem(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.api.models.shopping_list.ShoppingListLineItemImpl()); + } +} diff --git a/references.txt b/references.txt index 83e9f9afdd..e09135814f 100644 --- a/references.txt +++ b/references.txt @@ -344,3 +344,4 @@ df53588d26d7953dfdf44166866ca03045f0a70b f4f3c42381257c319000e05bd5b61074d18b0a5f 9066fb1012d20a92037e102e18a6295bdbcb82e3 4025ec42d633ae6b77320e24f6244d9dce608e6e +7abe530c4e76020a59ffb61623f20b87ae406e02