Interface ResourceUpdatedDeliveryPayload

All Superinterfaces:
DeliveryPayload
All Known Subinterfaces:
ResourceUpdatedDelivery

public interface ResourceUpdatedDeliveryPayload extends DeliveryPayload

This payload is sent for a ChangeSubscription when a resource is updated. This includes updates by a background process, like a change in product availability.


Example to create an instance using the builder pattern

     ResourceUpdatedDeliveryPayload resourceUpdatedDeliveryPayload = ResourceUpdatedDeliveryPayload.builder()
             .projectKey("{projectKey}")
             .resource(resourceBuilder -> resourceBuilder)
             .version(0.3)
             .oldVersion(0.3)
             .modifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .build()
 
  • Field Details

    • RESOURCE_UPDATED

      static final String RESOURCE_UPDATED
      discriminator value for ResourceUpdatedDeliveryPayload
      See Also:
  • Method Details

    • getVersion

      @NotNull @NotNull Long getVersion()

      Last seen version of the resource.

      Returns:
      version
    • getOldVersion

      @NotNull @NotNull Long getOldVersion()

      Version of the resource before the update.

      Returns:
      oldVersion
    • getModifiedAt

      @NotNull @NotNull ZonedDateTime getModifiedAt()

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

      Returns:
      modifiedAt
    • setVersion

      void setVersion(Long version)

      Last seen version of the resource.

      Parameters:
      version - value to be set
    • setOldVersion

      void setOldVersion(Long oldVersion)

      Version of the resource before the update.

      Parameters:
      oldVersion - value to be set
    • setModifiedAt

      void setModifiedAt(ZonedDateTime modifiedAt)

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

      Parameters:
      modifiedAt - value to be set
    • of

      factory method
      Returns:
      instance of ResourceUpdatedDeliveryPayload
    • of

      factory method to create a shallow copy ResourceUpdatedDeliveryPayload
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ResourceUpdatedDeliveryPayload
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ResourceUpdatedDeliveryPayload
      Returns:
      builder
    • builder

      create builder for ResourceUpdatedDeliveryPayload instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withResourceUpdatedDeliveryPayload

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