Interface EventSubscription
For EventSubscription, the format of the payload is custom for each specific notification.
Example to create an instance using the builder pattern
EventSubscription eventSubscription = EventSubscription.builder()
.resourceTypeId(EventSubscriptionResourceTypeId.CHECKOUT)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic EventSubscriptionBuilder
builder()
builder factory method for EventSubscriptionstatic EventSubscriptionBuilder
builder
(EventSubscription template) create builder for EventSubscription instancecopyDeep()
static EventSubscription
deepCopy
(EventSubscription template) factory method to create a deep copy of EventSubscription@NotNull EventSubscriptionResourceTypeId
Unique identifier for the type of resource.getTypes()
Must contain valid event types for the resource.static EventSubscription
of()
factory methodstatic EventSubscription
of
(EventSubscription template) factory method to create a shallow copy EventSubscriptionvoid
setResourceTypeId
(EventSubscriptionResourceTypeId resourceTypeId) Unique identifier for the type of resource.void
Must contain valid event types for the resource.void
Must contain valid event types for the resource.static com.fasterxml.jackson.core.type.TypeReference<EventSubscription>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withEventSubscription
(Function<EventSubscription, T> helper) accessor map function
-
Method Details
-
getResourceTypeId
Unique identifier for the type of resource.
- Returns:
- resourceTypeId
-
getTypes
Must contain valid event types for the resource. For example, for resource type
import-api
the event typeImportContainerCreated
is valid. If notypes
are given, the Subscription will receive all events for the defined resource type.- Returns:
- types
-
setResourceTypeId
Unique identifier for the type of resource.
- Parameters:
resourceTypeId
- value to be set
-
setTypes
Must contain valid event types for the resource. For example, for resource type
import-api
the event typeImportContainerCreated
is valid. If notypes
are given, the Subscription will receive all events for the defined resource type.- Parameters:
types
- values to be set
-
setTypes
Must contain valid event types for the resource. For example, for resource type
import-api
the event typeImportContainerCreated
is valid. If notypes
are given, the Subscription will receive all events for the defined resource type.- Parameters:
types
- values to be set
-
of
factory method- Returns:
- instance of EventSubscription
-
of
factory method to create a shallow copy EventSubscription- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
EventSubscription copyDeep() -
deepCopy
factory method to create a deep copy of EventSubscription- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for EventSubscription- Returns:
- builder
-
builder
create builder for EventSubscription instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withEventSubscription
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
-