Class EventSubscriptionBuilder
- All Implemented Interfaces:
Builder<EventSubscription>
Example to create an instance using the builder pattern
EventSubscription eventSubscription = EventSubscription.builder()
.resourceTypeId(EventSubscriptionResourceTypeId.CHECKOUT)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds EventSubscription with checking for non-null required valuesbuilds EventSubscription without checking for non-null required valuesUnique identifier for the type of resource.getTypes()
Must contain valid event types for the resource.static EventSubscriptionBuilder
of()
factory method for an instance of EventSubscriptionBuilderstatic EventSubscriptionBuilder
of
(EventSubscription template) create builder for EventSubscription instanceMust contain valid event types for the resource.resourceTypeId
(EventSubscriptionResourceTypeId resourceTypeId) Unique identifier for the type of resource.Must contain valid event types for the resource.Must contain valid event types for the resource.
-
Constructor Details
-
EventSubscriptionBuilder
public EventSubscriptionBuilder()
-
-
Method Details
-
resourceTypeId
Unique identifier for the type of resource.
- Parameters:
resourceTypeId
- value to be set- Returns:
- Builder
-
types
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
- value to be set- Returns:
- Builder
-
types
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
- value to be set- Returns:
- Builder
-
plusTypes
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
- value to be set- Returns:
- Builder
-
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
-
build
builds EventSubscription with checking for non-null required values- Specified by:
build
in interfaceBuilder<EventSubscription>
- Returns:
- EventSubscription
-
buildUnchecked
builds EventSubscription without checking for non-null required values- Returns:
- EventSubscription
-
of
factory method for an instance of EventSubscriptionBuilder- Returns:
- builder
-
of
create builder for EventSubscription instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-