Interface Subscription
- All Superinterfaces:
BaseResource,DomainResource<Subscription>,Identifiable<Subscription>,Versioned<Subscription>,WithKey
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"))
.destination(destinationBuilder -> destinationBuilder)
.plusMessages(messagesBuilder -> messagesBuilder)
.plusChanges(changesBuilder -> changesBuilder)
.plusEvents(eventsBuilder -> eventsBuilder)
.format(formatBuilder -> formatBuilder)
.status(SubscriptionHealthStatus.HEALTHY)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic SubscriptionBuilderbuilder()builder factory method for Subscriptionstatic SubscriptionBuilderbuilder(Subscription template) create builder for Subscription instancecopyDeep()static SubscriptiondeepCopy(Subscription template) factory method to create a deep copy of Subscription@NotNull @Valid List<ChangeSubscription>Changes subscribed to.@NotNull ZonedDateTimeDate and time (UTC) the Subscription was initially created.@Valid CreatedByIDs and references that created the Subscription.@NotNull @Valid DestinationMessaging service to which the notifications are sent.@NotNull @Valid List<EventSubscription>Events subscribed to.@NotNull @Valid DeliveryFormatFormat in which the payload is delivered.@NotNull StringgetId()Unique identifier of the Subscription.getKey()User-defined unique identifier of the Subscription.@NotNull ZonedDateTimeDate and time (UTC) the Subscription was last modified.@Valid LastModifiedByIDs and references that last modified the Subscription.@NotNull @Valid List<MessageSubscription>Messages subscribed to.@NotNull SubscriptionHealthStatusStatus of the Subscription.@NotNull LongCurrent version of the Subscription.static Subscriptionof()factory methodstatic Subscriptionof(Subscription template) factory method to create a shallow copy SubscriptionvoidsetChanges(ChangeSubscription... changes) Changes subscribed to.voidsetChanges(List<ChangeSubscription> changes) Changes subscribed to.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Subscription was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the Subscription.voidsetDestination(Destination destination) Messaging service to which the notifications are sent.voidsetEvents(EventSubscription... events) Events subscribed to.voidsetEvents(List<EventSubscription> events) Events subscribed to.voidsetFormat(DeliveryFormat format) Format in which the payload is delivered.voidUnique identifier of the Subscription.voidUser-defined unique identifier of the Subscription.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Subscription was last modified.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the Subscription.voidsetMessages(MessageSubscription... messages) Messages subscribed to.voidsetMessages(List<MessageSubscription> messages) Messages subscribed to.voidsetStatus(SubscriptionHealthStatus status) Status of the Subscription.voidsetVersion(Long version) Current version of the Subscription.static com.fasterxml.jackson.core.type.TypeReference<Subscription>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithSubscription(Function<Subscription, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.DomainResource
get
-
Method Details
-
getId
Unique identifier of the Subscription.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<Subscription>- Specified by:
getIdin interfaceIdentifiable<Subscription>- Specified by:
getIdin interfaceVersioned<Subscription>- Returns:
- id
-
getVersion
Current version of the Subscription.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<Subscription>- Specified by:
getVersionin interfaceVersioned<Subscription>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Subscription was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Subscription was last modified.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Subscription.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Subscription.
- Returns:
- createdBy
-
getDestination
Messaging service to which the notifications are sent.
- Returns:
- destination
-
getKey
String getKey()User-defined unique identifier of the Subscription.
-
getMessages
Messages subscribed to.
- Returns:
- messages
-
getChanges
Changes subscribed to.
- Returns:
- changes
-
getEvents
Events subscribed to.
- Returns:
- events
-
getFormat
Format in which the payload is delivered.
- Returns:
- format
-
getStatus
Status of the Subscription.
- Returns:
- status
-
setId
Unique identifier of the Subscription.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the Subscription.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the Subscription was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the Subscription was last modified.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the Subscription.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the Subscription.
- Parameters:
createdBy- value to be set
-
setDestination
Messaging service to which the notifications are sent.
- Parameters:
destination- value to be set
-
setKey
User-defined unique identifier of the Subscription.
- Parameters:
key- value to be set
-
setMessages
Messages subscribed to.
- Parameters:
messages- values to be set
-
setMessages
Messages subscribed to.
- Parameters:
messages- values to be set
-
setChanges
Changes subscribed to.
- Parameters:
changes- values to be set
-
setChanges
Changes subscribed to.
- Parameters:
changes- values to be set
-
setEvents
Events subscribed to.
- Parameters:
events- values to be set
-
setEvents
Events subscribed to.
- Parameters:
events- values to be set
-
setFormat
Format in which the payload is delivered.
- Parameters:
format- value to be set
-
setStatus
Status of the Subscription.
- Parameters:
status- value to be set
-
of
factory method- Returns:
- instance of Subscription
-
of
factory method to create a shallow copy Subscription- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
Subscription copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of Subscription- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Subscription- Returns:
- builder
-
builder
create builder for Subscription instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withSubscription
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
-