Interface MessageDeliveryPayload

All Superinterfaces:
DeliveryPayload, MessageDeliveryPayloadMixin
All Known Subinterfaces:
MessageDelivery

public interface MessageDeliveryPayload extends DeliveryPayload, MessageDeliveryPayloadMixin

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 Details

  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique ID of the message.

      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Last seen version of the resource.

      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the resource was initially created.

      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the resource was last modified.

      Returns:
      lastModifiedAt
    • getSequenceNumber

      @NotNull @NotNull Long 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 the sequenceNumber of the current message.

      Returns:
      sequenceNumber
    • getResourceVersion

      @NotNull @NotNull Long getResourceVersion()

      Version of the resource on which the change was performed.

      Returns:
      resourceVersion
    • getPayloadNotIncluded

      @Valid @Valid PayloadNotIncluded 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

      void setId(String id)

      Unique ID of the message.

      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Last seen version of the resource.

      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the resource was initially created.

      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the resource was last modified.

      Parameters:
      lastModifiedAt - value to be set
    • setSequenceNumber

      void setSequenceNumber(Long sequenceNumber)

      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 the sequenceNumber of the current message.

      Parameters:
      sequenceNumber - value to be set
    • setResourceVersion

      void setResourceVersion(Long resourceVersion)

      Version of the resource on which the change was performed.

      Parameters:
      resourceVersion - value to be set
    • setPayloadNotIncluded

      void setPayloadNotIncluded(PayloadNotIncluded payloadNotIncluded)

      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

      default <T> T withMessageDeliveryPayload(Function<MessageDeliveryPayload,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<MessageDeliveryPayload> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference