Interface MessageDeliveryPayload
- All Superinterfaces:
DeliveryPayload
,MessageDeliveryPayloadMixin
- All Known Subinterfaces:
MessageDelivery
This payload is sent for a MessageSubscription.
Example to create an instance using the builder pattern
MessageDeliveryPayload messageDeliveryPayload = MessageDeliveryPayload.builder()
.projectKey("{projectKey}")
.resource(resourceBuilder -> resourceBuilder)
.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)
.resourceVersion(0.3)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MessageDeliveryPayloadbuilder
(MessageDeliveryPayload template) create builder for MessageDeliveryPayload instancestatic MessageDeliveryPayload
deepCopy
(MessageDeliveryPayload template) factory method to create a deep copy of MessageDeliveryPayload@NotNull ZonedDateTime
Date and time (UTC) the resource was initially created.@NotNull String
getId()
Unique ID of the message.@NotNull ZonedDateTime
Date and time (UTC) the resource was last modified.@Valid PayloadNotIncluded
If the payload does not fit into the size limit or its format is not accepted by the messaging service, thepayloadNotIncluded
field is present.@NotNull Long
Version of the resource on which the update was performed.@NotNull Long
Used to ensure all messages of the resource are processed in correct order.@NotNull Long
Last seen version of the resource.static MessageDeliveryPayload
of()
factory methodstatic MessageDeliveryPayload
of
(MessageDeliveryPayload template) factory method to create a shallow copy MessageDeliveryPayloadvoid
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the resource was initially created.void
Unique ID of the message.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the resource was last modified.void
setPayloadNotIncluded
(PayloadNotIncluded payloadNotIncluded) If the payload does not fit into the size limit or its format is not accepted by the messaging service, thepayloadNotIncluded
field is present.void
setResourceVersion
(Long resourceVersion) Version of the resource on which the update was performed.void
setSequenceNumber
(Long sequenceNumber) Used to ensure all messages of the resource are processed in correct order.void
setVersion
(Long version) Last seen version of the resource.static com.fasterxml.jackson.core.type.TypeReference<MessageDeliveryPayload>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.subscription.DeliveryPayload
getNotificationType, getProjectKey, getResource, getResourceUserProvidedIdentifiers, setProjectKey, setResource, setResourceUserProvidedIdentifiers, withDeliveryPayload
Methods inherited from interface com.commercetools.api.models.subscription.MessageDeliveryPayloadMixin
getMessagePayload, hasCompleteMessage
-
Field Details
-
MESSAGE
discriminator value for MessageDeliveryPayload- See Also:
-
-
Method Details
-
getId
Unique ID of the message.
- Returns:
- id
-
getVersion
Last seen version of the resource.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the resource was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the resource was last modified.
- Returns:
- lastModifiedAt
-
getSequenceNumber
Used to ensure all messages of the resource are processed in correct order. The
sequenceNumber
of the next message of the resource is a successor of thesequenceNumber
of the current message.- Returns:
- sequenceNumber
-
getResourceVersion
Version of the resource on which the update was performed.
- Returns:
- resourceVersion
-
getPayloadNotIncluded
If the payload does not fit into the size limit or its format is not accepted by the messaging service, the
payloadNotIncluded
field is present.- Returns:
- payloadNotIncluded
-
setId
Unique ID of the message.
- Parameters:
id
- value to be set
-
setVersion
Last seen version of the resource.
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the resource was initially created.
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the resource was last modified.
- Parameters:
lastModifiedAt
- value to be set
-
setSequenceNumber
Used to ensure all messages of the resource are processed in correct order. The
sequenceNumber
of the next message of the resource is a successor of thesequenceNumber
of the current message.- Parameters:
sequenceNumber
- value to be set
-
setResourceVersion
Version of the resource on which the update was performed.
- Parameters:
resourceVersion
- value to be set
-
setPayloadNotIncluded
If the payload does not fit into the size limit or its format is not accepted by the messaging service, the
payloadNotIncluded
field is present.- Parameters:
payloadNotIncluded
- value to be set
-
of
factory method- Returns:
- instance of MessageDeliveryPayload
-
of
factory method to create a shallow copy MessageDeliveryPayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of MessageDeliveryPayload- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MessageDeliveryPayload- Returns:
- builder
-
builder
create builder for MessageDeliveryPayload instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMessageDeliveryPayload
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-