Interface SubscriptionDraft
- All Superinterfaces:
Draft<SubscriptionDraft>
,WithKey
Either messages
or changes
must be set.
Example to create an instance using the builder pattern
SubscriptionDraft subscriptionDraft = SubscriptionDraft.builder()
.destination(destinationBuilder -> destinationBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic SubscriptionDraftBuilder
builder()
builder factory method for SubscriptionDraftstatic SubscriptionDraftBuilder
builder
(SubscriptionDraft template) create builder for SubscriptionDraft instancestatic SubscriptionDraft
deepCopy
(SubscriptionDraft template) factory method to create a deep copy of SubscriptionDraft@Valid List<ChangeSubscription>
Changes to be subscribed to.@NotNull @Valid Destination
Messaging service to which the notifications are sent.@Valid DeliveryFormat
Format in which the payload is delivered.getKey()
User-defined unique identifier for the Subscription.@Valid List<MessageSubscription>
Messages to be subscribed to.static SubscriptionDraft
of()
factory methodstatic SubscriptionDraft
of
(SubscriptionDraft template) factory method to create a shallow copy SubscriptionDraftvoid
setChanges
(ChangeSubscription... changes) Changes to be subscribed to.void
setChanges
(List<ChangeSubscription> changes) Changes to be subscribed to.void
setDestination
(Destination destination) Messaging service to which the notifications are sent.void
setFormat
(DeliveryFormat format) Format in which the payload is delivered.void
User-defined unique identifier for the Subscription.void
setMessages
(MessageSubscription... messages) Messages to be subscribed to.void
setMessages
(List<MessageSubscription> messages) Messages to be subscribed to.static com.fasterxml.jackson.core.type.TypeReference<SubscriptionDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withSubscriptionDraft
(Function<SubscriptionDraft, T> helper) accessor map function
-
Method Details
-
getChanges
Changes to be subscribed to.
- Returns:
- changes
-
getDestination
Messaging service to which the notifications are sent.
- Returns:
- destination
-
getKey
String getKey()User-defined unique identifier for the Subscription.
-
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
-
setChanges
Changes to be subscribed to.
- Parameters:
changes
- values to be set
-
setChanges
Changes to be subscribed to.
- Parameters:
changes
- values to be set
-
setDestination
Messaging service to which the notifications are sent.
- Parameters:
destination
- value to be set
-
setKey
User-defined unique identifier for the Subscription.
- Parameters:
key
- value to be set
-
setMessages
Messages to be subscribed to.
- Parameters:
messages
- values to be set
-
setMessages
Messages to be subscribed to.
- Parameters:
messages
- values to be set
-
setFormat
Format in which the payload is delivered. When not provided, the PlatformFormat is selected by default.
- Parameters:
format
- value to be set
-
of
factory method- Returns:
- instance of SubscriptionDraft
-
of
factory method to create a shallow copy SubscriptionDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of SubscriptionDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SubscriptionDraft- Returns:
- builder
-
builder
create builder for SubscriptionDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withSubscriptionDraft
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
-