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 EventSubscriptionBuilderbuilder()builder factory method for EventSubscriptionstatic EventSubscriptionBuilderbuilder(EventSubscription template) create builder for EventSubscription instancecopyDeep()static EventSubscriptiondeepCopy(EventSubscription template) factory method to create a deep copy of EventSubscription@NotNull EventSubscriptionResourceTypeIdUnique identifier for the type of resource.getTypes()Must contain valid event types for the resource.static EventSubscriptionof()factory methodstatic EventSubscriptionof(EventSubscription template) factory method to create a shallow copy EventSubscriptionvoidsetResourceTypeId(EventSubscriptionResourceTypeId resourceTypeId) Unique identifier for the type of resource.voidMust contain valid event types for the resource.voidMust contain valid event types for the resource.static com.fasterxml.jackson.core.type.TypeReference<EventSubscription>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithEventSubscription(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-apithe event typeImportContainerCreatedis valid. If notypesare 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-apithe event typeImportContainerCreatedis valid. If notypesare 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-apithe event typeImportContainerCreatedis valid. If notypesare 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
-