Interface MessageDeliveryPayload
- All Superinterfaces:
DeliveryPayload,MessageDeliveryPayloadMixin,SubscriptionNotification
- 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
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for MessageDeliveryPayloadbuilder(MessageDeliveryPayload template) create builder for MessageDeliveryPayload instancecopyDeep()static MessageDeliveryPayloaddeepCopy(MessageDeliveryPayload template) factory method to create a deep copy of MessageDeliveryPayload@NotNull ZonedDateTimeDate and time (UTC) the resource was initially created.@NotNull StringgetId()Unique ID of the message.@NotNull ZonedDateTimeDate and time (UTC) the resource was last modified.@Valid PayloadNotIncludedIf the payload does not fit into the size limit or its format is not accepted by the messaging service, thepayloadNotIncludedfield is present.@NotNull LongVersion of the resource on which the update was performed.@NotNull LongUsed to ensure all messages of the resource are processed in correct order.@NotNull LongLast seen version of the resource.static MessageDeliveryPayloadof()factory methodstatic MessageDeliveryPayloadof(MessageDeliveryPayload template) factory method to create a shallow copy MessageDeliveryPayloadvoidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the resource was initially created.voidUnique ID of the message.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the resource was last modified.voidsetPayloadNotIncluded(PayloadNotIncluded payloadNotIncluded) If the payload does not fit into the size limit or its format is not accepted by the messaging service, thepayloadNotIncludedfield is present.voidsetResourceVersion(Long resourceVersion) Version of the resource on which the update was performed.voidsetSequenceNumber(Long sequenceNumber) Used to ensure all messages of the resource are processed in correct order.voidsetVersion(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> Taccessor map functionMethods inherited from interface com.commercetools.api.models.subscription.DeliveryPayload
getProjectKey, getResource, getResourceUserProvidedIdentifiers, setProjectKey, setResource, setResourceUserProvidedIdentifiers, withDeliveryPayloadMethods inherited from interface com.commercetools.api.models.subscription.MessageDeliveryPayloadMixin
getMessagePayload, hasCompleteMessageMethods inherited from interface com.commercetools.api.models.subscription.SubscriptionNotification
getNotificationType, withSubscriptionNotification
-
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
sequenceNumberof the next message of the resource is a successor of thesequenceNumberof 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
payloadNotIncludedfield 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
sequenceNumberof the next message of the resource is a successor of thesequenceNumberof 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
payloadNotIncludedfield 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
-
copyDeep
MessageDeliveryPayload copyDeep()- Specified by:
copyDeepin interfaceDeliveryPayload- Specified by:
copyDeepin interfaceSubscriptionNotification
-
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
-