Interface DeliveryPayload

All Superinterfaces:
SubscriptionNotification
All Known Subinterfaces:
MessageDelivery, MessageDeliveryPayload, ResourceCreatedDelivery, ResourceCreatedDeliveryPayload, ResourceDeletedDelivery, ResourceDeletedDeliveryPayload, ResourceUpdatedDelivery, ResourceUpdatedDeliveryPayload, SubscriptionDelivery

public interface DeliveryPayload extends SubscriptionNotification

All payloads for the PlatformFormat share these common fields.


Example to create an instance using the builder pattern

     DeliveryPayload deliveryPayload = DeliveryPayload.builder()
             .projectKey("{projectKey}")
             .resource(resourceBuilder -> resourceBuilder)
             .build()
 
  • Method Details

    • getProjectKey

      @NotNull @NotNull String getProjectKey()

      key of the Project. Useful for processing notifications if the Destination receives them from multiple Projects.

      Returns:
      projectKey
    • getResource

      @NotNull @Valid @NotNull @Valid Reference getResource()

      Reference to the resource that triggered the notification.

      Returns:
      resource
    • getResourceUserProvidedIdentifiers

      @Valid @Valid UserProvidedIdentifiers getResourceUserProvidedIdentifiers()

      User-defined unique identifiers of the resource.

      Returns:
      resourceUserProvidedIdentifiers
    • setProjectKey

      void setProjectKey(String projectKey)

      key of the Project. Useful for processing notifications if the Destination receives them from multiple Projects.

      Parameters:
      projectKey - value to be set
    • setResource

      void setResource(Reference resource)

      Reference to the resource that triggered the notification.

      Parameters:
      resource - value to be set
    • setResourceUserProvidedIdentifiers

      void setResourceUserProvidedIdentifiers(UserProvidedIdentifiers resourceUserProvidedIdentifiers)

      User-defined unique identifiers of the resource.

      Parameters:
      resourceUserProvidedIdentifiers - value to be set
    • copyDeep

      DeliveryPayload copyDeep()
      Specified by:
      copyDeep in interface SubscriptionNotification
    • deepCopy

      @Nullable static DeliveryPayload deepCopy(@Nullable DeliveryPayload template)
      factory method to create a deep copy of DeliveryPayload
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • withDeliveryPayload

      default <T> T withDeliveryPayload(Function<DeliveryPayload,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<DeliveryPayload> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference