Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated SDKs #780

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,20 @@
- 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`
</details>


<details>
<summary>Added Enum(s)</summary>

- added enum `Canceled` to type `ShipmentState`
- added enum `shopping-list` to type `MessageSubscriptionResourceTypeId`
</details>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13504,6 +13504,11 @@ type ShoppingListLineItem {
variant: ProductVariant
}

type ShoppingListLineItemAdded implements MessagePayload {
lineItem: ShoppingListLineItem!
type: String!
}

input ShoppingListLineItemDraft {
productId: String
key: String
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>Generated after a successful Add ShoppingListLineItem update action.</p>
*
* <hr>
* Example to create an instance using the builder pattern
* <div class=code-example>
* <pre><code class='java'>
* 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()
* </code></pre>
* </div>
*/
@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";

/**
* <p>Line Item that was added to the ShoppingList.</p>
* @return lineItem
*/
@NotNull
@Valid
@JsonProperty("lineItem")
public ShoppingListLineItem getLineItem();

/**
* <p>Line Item that was added to the ShoppingList.</p>
* @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 <T> mapped type
* @param helper function to map the object
* @return mapped value
*/
default <T> T withShoppingListLineItemAddedMessage(Function<ShoppingListLineItemAddedMessage, T> helper) {
return helper.apply(this);
}

/**
* gives a TypeReference for usage with Jackson DataBind
* @return TypeReference
*/
public static com.fasterxml.jackson.core.type.TypeReference<ShoppingListLineItemAddedMessage> typeReference() {
return new com.fasterxml.jackson.core.type.TypeReference<ShoppingListLineItemAddedMessage>() {
@Override
public String toString() {
return "TypeReference<ShoppingListLineItemAddedMessage>";
}
};
}
}
Loading
Loading