Class SubscriptionDraftBuilder
- All Implemented Interfaces:
Builder<SubscriptionDraft>
Example to create an instance using the builder pattern
SubscriptionDraft subscriptionDraft = SubscriptionDraft.builder()
.destination(destinationBuilder -> destinationBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionChanges to be subscribed to.Messages to be subscribed to.build()
builds SubscriptionDraft with checking for non-null required valuesbuilds SubscriptionDraft without checking for non-null required valueschanges
(ChangeSubscription... changes) Changes to be subscribed to.changes
(List<ChangeSubscription> changes) Changes to be subscribed to.destination
(Destination destination) Messaging service to which the notifications are sent.destination
(Function<DestinationBuilder, Builder<? extends Destination>> builder) Messaging service to which the notifications are sent.format
(DeliveryFormat format) Format in which the payload is delivered.format
(Function<DeliveryFormatBuilder, Builder<? extends DeliveryFormat>> builder) Format in which the payload is delivered.Changes to be subscribed to.Messaging service to which the notifications are sent.Format in which the payload is delivered.getKey()
User-defined unique identifier for the Subscription.Messages to be subscribed to.User-defined unique identifier for the Subscription.messages
(MessageSubscription... messages) Messages to be subscribed to.messages
(List<MessageSubscription> messages) Messages to be subscribed to.static SubscriptionDraftBuilder
of()
factory method for an instance of SubscriptionDraftBuilderstatic SubscriptionDraftBuilder
of
(SubscriptionDraft template) create builder for SubscriptionDraft instanceplusChanges
(ChangeSubscription... changes) Changes to be subscribed to.Changes to be subscribed to.plusMessages
(MessageSubscription... messages) Messages to be subscribed to.Messages to be subscribed to.Changes to be subscribed to.Messages to be subscribed to.Changes to be subscribed to.Messages to be subscribed to.
-
Constructor Details
-
SubscriptionDraftBuilder
public SubscriptionDraftBuilder()
-
-
Method Details
-
changes
Changes to be subscribed to.
- Parameters:
changes
- value to be set- Returns:
- Builder
-
changes
Changes to be subscribed to.
- Parameters:
changes
- value to be set- Returns:
- Builder
-
plusChanges
Changes to be subscribed to.
- Parameters:
changes
- value to be set- Returns:
- Builder
-
plusChanges
public SubscriptionDraftBuilder plusChanges(Function<ChangeSubscriptionBuilder, ChangeSubscriptionBuilder> builder) Changes to be subscribed to.
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
withChanges
public SubscriptionDraftBuilder withChanges(Function<ChangeSubscriptionBuilder, ChangeSubscriptionBuilder> builder) Changes to be subscribed to.
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
addChanges
public SubscriptionDraftBuilder addChanges(Function<ChangeSubscriptionBuilder, ChangeSubscription> builder) Changes to be subscribed to.
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
setChanges
public SubscriptionDraftBuilder setChanges(Function<ChangeSubscriptionBuilder, ChangeSubscription> builder) Changes to be subscribed to.
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
destination
Messaging service to which the notifications are sent.
- Parameters:
destination
- value to be set- Returns:
- Builder
-
destination
public SubscriptionDraftBuilder destination(Function<DestinationBuilder, Builder<? extends Destination>> builder) Messaging service to which the notifications are sent.
- Parameters:
builder
- function to build the destination value- Returns:
- Builder
-
key
User-defined unique identifier for the Subscription.
- Parameters:
key
- value to be set- Returns:
- Builder
-
messages
Messages to be subscribed to.
- Parameters:
messages
- value to be set- Returns:
- Builder
-
messages
Messages to be subscribed to.
- Parameters:
messages
- value to be set- Returns:
- Builder
-
plusMessages
Messages to be subscribed to.
- Parameters:
messages
- value to be set- Returns:
- Builder
-
plusMessages
public SubscriptionDraftBuilder plusMessages(Function<MessageSubscriptionBuilder, MessageSubscriptionBuilder> builder) Messages to be subscribed to.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
withMessages
public SubscriptionDraftBuilder withMessages(Function<MessageSubscriptionBuilder, MessageSubscriptionBuilder> builder) Messages to be subscribed to.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
addMessages
public SubscriptionDraftBuilder addMessages(Function<MessageSubscriptionBuilder, MessageSubscription> builder) Messages to be subscribed to.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
setMessages
public SubscriptionDraftBuilder setMessages(Function<MessageSubscriptionBuilder, MessageSubscription> builder) Messages to be subscribed to.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
format
Format in which the payload is delivered. When not provided, the PlatformFormat is selected by default.
- Parameters:
format
- value to be set- Returns:
- Builder
-
format
public SubscriptionDraftBuilder format(Function<DeliveryFormatBuilder, Builder<? extends DeliveryFormat>> builder) Format in which the payload is delivered. When not provided, the PlatformFormat is selected by default.
- Parameters:
builder
- function to build the format value- Returns:
- Builder
-
getChanges
Changes to be subscribed to.
- Returns:
- changes
-
getDestination
Messaging service to which the notifications are sent.
- Returns:
- destination
-
getKey
User-defined unique identifier for the Subscription.
- Returns:
- key
-
getMessages
Messages to be subscribed to.
- Returns:
- messages
-
getFormat
Format in which the payload is delivered. When not provided, the PlatformFormat is selected by default.
- Returns:
- format
-
build
builds SubscriptionDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<SubscriptionDraft>
- Returns:
- SubscriptionDraft
-
buildUnchecked
builds SubscriptionDraft without checking for non-null required values- Returns:
- SubscriptionDraft
-
of
factory method for an instance of SubscriptionDraftBuilder- Returns:
- builder
-
of
create builder for SubscriptionDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-