Class SubscriptionBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<Subscription>
Example to create an instance using the builder pattern
Subscription subscription = Subscription.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.plusChanges(changesBuilder -> changesBuilder)
.destination(destinationBuilder -> destinationBuilder)
.plusMessages(messagesBuilder -> messagesBuilder)
.format(formatBuilder -> formatBuilder)
.status(SubscriptionHealthStatus.HEALTHY)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionChange notifications subscribed to.Messages subscribed to.build()
builds Subscription with checking for non-null required valuesbuilds Subscription without checking for non-null required valueschanges
(ChangeSubscription... changes) Change notifications subscribed to.changes
(List<ChangeSubscription> changes) Change notifications subscribed to.createdAt
(ZonedDateTime createdAt) Date and time (UTC) the Subscription was initially created.Present on resources created after 1 February 2019 except for events not tracked.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) Present on resources created after 1 February 2019 except for events not tracked.destination
(Destination destination) Messaging service to which the messages are to be sent.destination
(Function<DestinationBuilder, io.vrap.rmf.base.client.Builder<? extends Destination>> builder) Messaging service to which the messages are to be sent.format
(DeliveryFormat format) Format in which the payload is delivered.format
(Function<DeliveryFormatBuilder, io.vrap.rmf.base.client.Builder<? extends DeliveryFormat>> builder) Format in which the payload is delivered.Change notifications subscribed to.Date and time (UTC) the Subscription was initially created.Present on resources created after 1 February 2019 except for events not tracked.Messaging service to which the messages are to be sent.Format in which the payload is delivered.getId()
Unique identifier of the Subscription.getKey()
User-defined unique identifier of the Subscription.Date and time (UTC) the Subscription was last modified.Present on resources created after 1 February 2019 except for events not tracked.Messages subscribed to.Status of the Subscription.Current version of the Subscription.Unique identifier of the Subscription.User-defined unique identifier of the Subscription.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Subscription was last modified.lastModifiedBy
(LastModifiedBy lastModifiedBy) Present on resources created after 1 February 2019 except for events not tracked.Present on resources created after 1 February 2019 except for events not tracked.messages
(MessageSubscription... messages) Messages subscribed to.messages
(List<MessageSubscription> messages) Messages subscribed to.static SubscriptionBuilder
of()
factory method for an instance of SubscriptionBuilderstatic SubscriptionBuilder
of
(Subscription template) create builder for Subscription instanceplusChanges
(ChangeSubscription... changes) Change notifications subscribed to.Change notifications subscribed to.plusMessages
(MessageSubscription... messages) Messages subscribed to.Messages subscribed to.Change notifications subscribed to.Messages subscribed to.status
(SubscriptionHealthStatus status) Status of the Subscription.Current version of the Subscription.Change notifications subscribed to.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) Present on resources created after 1 February 2019 except for events not tracked.Present on resources created after 1 February 2019 except for events not tracked.Messages subscribed to.
-
Constructor Details
-
SubscriptionBuilder
public SubscriptionBuilder()
-
-
Method Details
-
id
Unique identifier of the Subscription.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Subscription.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Subscription was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Subscription was last modified.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public SubscriptionBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public SubscriptionBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
changes
Change notifications subscribed to.
- Parameters:
changes
- value to be set- Returns:
- Builder
-
changes
Change notifications subscribed to.
- Parameters:
changes
- value to be set- Returns:
- Builder
-
plusChanges
Change notifications subscribed to.
- Parameters:
changes
- value to be set- Returns:
- Builder
-
plusChanges
public SubscriptionBuilder plusChanges(Function<ChangeSubscriptionBuilder, ChangeSubscriptionBuilder> builder) Change notifications subscribed to.
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
withChanges
public SubscriptionBuilder withChanges(Function<ChangeSubscriptionBuilder, ChangeSubscriptionBuilder> builder) Change notifications subscribed to.
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
addChanges
public SubscriptionBuilder addChanges(Function<ChangeSubscriptionBuilder, ChangeSubscription> builder) Change notifications subscribed to.
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
setChanges
public SubscriptionBuilder setChanges(Function<ChangeSubscriptionBuilder, ChangeSubscription> builder) Change notifications subscribed to.
- Parameters:
builder
- function to build the changes value- Returns:
- Builder
-
destination
Messaging service to which the messages are to be sent.
- Parameters:
destination
- value to be set- Returns:
- Builder
-
destination
public SubscriptionBuilder destination(Function<DestinationBuilder, io.vrap.rmf.base.client.Builder<? extends Destination>> builder) Messaging service to which the messages are to be sent.
- Parameters:
builder
- function to build the destination value- Returns:
- Builder
-
key
User-defined unique identifier of the Subscription.
- Parameters:
key
- value to be set- Returns:
- Builder
-
messages
Messages subscribed to.
- Parameters:
messages
- value to be set- Returns:
- Builder
-
messages
Messages subscribed to.
- Parameters:
messages
- value to be set- Returns:
- Builder
-
plusMessages
Messages subscribed to.
- Parameters:
messages
- value to be set- Returns:
- Builder
-
plusMessages
public SubscriptionBuilder plusMessages(Function<MessageSubscriptionBuilder, MessageSubscriptionBuilder> builder) Messages subscribed to.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
withMessages
public SubscriptionBuilder withMessages(Function<MessageSubscriptionBuilder, MessageSubscriptionBuilder> builder) Messages subscribed to.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
addMessages
public SubscriptionBuilder addMessages(Function<MessageSubscriptionBuilder, MessageSubscription> builder) Messages subscribed to.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
setMessages
public SubscriptionBuilder setMessages(Function<MessageSubscriptionBuilder, MessageSubscription> builder) Messages subscribed to.
- Parameters:
builder
- function to build the messages value- Returns:
- Builder
-
format
Format in which the payload is delivered.
- Parameters:
format
- value to be set- Returns:
- Builder
-
format
public SubscriptionBuilder format(Function<DeliveryFormatBuilder, io.vrap.rmf.base.client.Builder<? extends DeliveryFormat>> builder) Format in which the payload is delivered.
- Parameters:
builder
- function to build the format value- Returns:
- Builder
-
status
Status of the Subscription.
- Parameters:
status
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Subscription.
- Returns:
- id
-
getVersion
Current version of the Subscription.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Subscription was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Subscription was last modified.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- createdBy
-
getChanges
Change notifications subscribed to.
- Returns:
- changes
-
getDestination
Messaging service to which the messages are to be sent.
- Returns:
- destination
-
getKey
User-defined unique identifier of the Subscription.
- Returns:
- key
-
getMessages
Messages subscribed to.
- Returns:
- messages
-
getFormat
Format in which the payload is delivered.
- Returns:
- format
-
getStatus
Status of the Subscription.
- Returns:
- status
-
build
builds Subscription with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<Subscription>
- Returns:
- Subscription
-
buildUnchecked
builds Subscription without checking for non-null required values- Returns:
- Subscription
-
of
factory method for an instance of SubscriptionBuilder- Returns:
- builder
-
of
create builder for Subscription instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-