Class CloudEventsPayloadImpl
- All Implemented Interfaces:
CloudEventsPayload
,io.vrap.rmf.base.client.ModelBase
The CloudEventsFormat represents event data in a way that conforms to a common specification. The message payload can be found inside the data
field.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.subscription.CloudEventsPayload
CLOUD_EVENTS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getData()
MessageDeliveryPayload, ResourceCreatedDeliveryPayload, ResourceUpdatedDeliveryPayload, or ResourceDeletedDeliveryPayload.The URI from which the message can be retrieved if messages are enabled.getId()
Unique identifier of the event.Corresponds to thesequenceNumber
of a MessageSubscription."Integer"
The default REST URI of the ReferenceTypeId that triggered this event, including the project key.The version of the CloudEvents specification which the event uses.Unique identifier of the resource that triggered the event.getTime()
Corresponds to thelastModifiedAt
of the resource at the time the event was triggered.getType()
Thetype
is namespaced withcom.commercetools
, followed by the ReferenceTypeId, the type of Subscription (eithermessage
orchange
), and the message or change type.int
hashCode()
void
setData
(DeliveryPayload data) MessageDeliveryPayload, ResourceCreatedDeliveryPayload, ResourceUpdatedDeliveryPayload, or ResourceDeletedDeliveryPayload.void
setDataref
(String dataref) The URI from which the message can be retrieved if messages are enabled.void
Unique identifier of the event.void
setSequence
(String sequence) Corresponds to thesequenceNumber
of a MessageSubscription.void
setSequencetype
(String sequencetype) "Integer"
void
The default REST URI of the ReferenceTypeId that triggered this event, including the project key.void
setSpecversion
(String specversion) The version of the CloudEvents specification which the event uses.void
setSubject
(String subject) Unique identifier of the resource that triggered the event.void
setTime
(ZonedDateTime time) Corresponds to thelastModifiedAt
of the resource at the time the event was triggered.void
Thetype
is namespaced withcom.commercetools
, followed by the ReferenceTypeId, the type of Subscription (eithermessage
orchange
), and the message or change type.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.subscription.CloudEventsPayload
withCloudEventsPayload
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
CloudEventsPayloadImpl
public CloudEventsPayloadImpl()create empty instance
-
-
Method Details
-
getSpecversion
The version of the CloudEvents specification which the event uses.
- Specified by:
getSpecversion
in interfaceCloudEventsPayload
- Returns:
- specversion
-
getId
Unique identifier of the event.
- Specified by:
getId
in interfaceCloudEventsPayload
- Returns:
- id
-
getType
The
type
is namespaced withcom.commercetools
, followed by the ReferenceTypeId, the type of Subscription (eithermessage
orchange
), and the message or change type. For example,com.commercetools.product.message.ProductPublished
orcom.commercetools.order.change.ResourceCreated
.- Specified by:
getType
in interfaceCloudEventsPayload
- Returns:
- type
-
getSource
The default REST URI of the ReferenceTypeId that triggered this event, including the project key.
- Specified by:
getSource
in interfaceCloudEventsPayload
- Returns:
- source
-
getSubject
Unique identifier of the resource that triggered the event.
- Specified by:
getSubject
in interfaceCloudEventsPayload
- Returns:
- subject
-
getTime
Corresponds to the
lastModifiedAt
of the resource at the time the event was triggered.- Specified by:
getTime
in interfaceCloudEventsPayload
- Returns:
- time
-
getSequence
Corresponds to the
sequenceNumber
of a MessageSubscription. Can be used to process messages in the correct order.- Specified by:
getSequence
in interfaceCloudEventsPayload
- Returns:
- sequence
-
getSequencetype
"Integer"
- Specified by:
getSequencetype
in interfaceCloudEventsPayload
- Returns:
- sequencetype
-
getDataref
The URI from which the message can be retrieved if messages are enabled. Only set for MessageSubscriptions.
- Specified by:
getDataref
in interfaceCloudEventsPayload
- Returns:
- dataref
-
getData
MessageDeliveryPayload, ResourceCreatedDeliveryPayload, ResourceUpdatedDeliveryPayload, or ResourceDeletedDeliveryPayload.
- Specified by:
getData
in interfaceCloudEventsPayload
- Returns:
- data
-
setSpecversion
Description copied from interface:CloudEventsPayload
The version of the CloudEvents specification which the event uses.
- Specified by:
setSpecversion
in interfaceCloudEventsPayload
- Parameters:
specversion
- value to be set
-
setId
Description copied from interface:CloudEventsPayload
Unique identifier of the event.
- Specified by:
setId
in interfaceCloudEventsPayload
- Parameters:
id
- value to be set
-
setType
Description copied from interface:CloudEventsPayload
The
type
is namespaced withcom.commercetools
, followed by the ReferenceTypeId, the type of Subscription (eithermessage
orchange
), and the message or change type. For example,com.commercetools.product.message.ProductPublished
orcom.commercetools.order.change.ResourceCreated
.- Specified by:
setType
in interfaceCloudEventsPayload
- Parameters:
type
- value to be set
-
setSource
Description copied from interface:CloudEventsPayload
The default REST URI of the ReferenceTypeId that triggered this event, including the project key.
- Specified by:
setSource
in interfaceCloudEventsPayload
- Parameters:
source
- value to be set
-
setSubject
Description copied from interface:CloudEventsPayload
Unique identifier of the resource that triggered the event.
- Specified by:
setSubject
in interfaceCloudEventsPayload
- Parameters:
subject
- value to be set
-
setTime
Description copied from interface:CloudEventsPayload
Corresponds to the
lastModifiedAt
of the resource at the time the event was triggered.- Specified by:
setTime
in interfaceCloudEventsPayload
- Parameters:
time
- value to be set
-
setSequence
Description copied from interface:CloudEventsPayload
Corresponds to the
sequenceNumber
of a MessageSubscription. Can be used to process messages in the correct order.- Specified by:
setSequence
in interfaceCloudEventsPayload
- Parameters:
sequence
- value to be set
-
setSequencetype
Description copied from interface:CloudEventsPayload
"Integer"
- Specified by:
setSequencetype
in interfaceCloudEventsPayload
- Parameters:
sequencetype
- value to be set
-
setDataref
Description copied from interface:CloudEventsPayload
The URI from which the message can be retrieved if messages are enabled. Only set for MessageSubscriptions.
- Specified by:
setDataref
in interfaceCloudEventsPayload
- Parameters:
dataref
- value to be set
-
setData
Description copied from interface:CloudEventsPayload
MessageDeliveryPayload, ResourceCreatedDeliveryPayload, ResourceUpdatedDeliveryPayload, or ResourceDeletedDeliveryPayload.
- Specified by:
setData
in interfaceCloudEventsPayload
- Parameters:
data
- value to be set
-
equals
-
hashCode
public int hashCode()
-