Interface ResourceCreatedDeliveryPayload

All Superinterfaces:
DeliveryPayload
All Known Subinterfaces:
ResourceCreatedDelivery

public interface ResourceCreatedDeliveryPayload extends DeliveryPayload

This payload is sent for a ChangeSubscription when a resource is created.


Example to create an instance using the builder pattern

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

    • RESOURCE_CREATED

      static final String RESOURCE_CREATED
      discriminator value for ResourceCreatedDeliveryPayload
      See Also:
  • Method Details

    • getVersion

      @NotNull @NotNull Long getVersion()

      Last seen version of the resource.

      Returns:
      version
    • getModifiedAt

      @NotNull @NotNull ZonedDateTime getModifiedAt()

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

      Returns:
      modifiedAt
    • setVersion

      void setVersion(Long version)

      Last seen version of the resource.

      Parameters:
      version - value to be set
    • setModifiedAt

      void setModifiedAt(ZonedDateTime modifiedAt)

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

      Parameters:
      modifiedAt - value to be set
    • of

      factory method
      Returns:
      instance of ResourceCreatedDeliveryPayload
    • of

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

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

      builder factory method for ResourceCreatedDeliveryPayload
      Returns:
      builder
    • builder

      create builder for ResourceCreatedDeliveryPayload instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withResourceCreatedDeliveryPayload

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