Class CloudEventsPayloadImpl

java.lang.Object
com.commercetools.api.models.subscription.CloudEventsPayloadImpl
All Implemented Interfaces:
CloudEventsPayload, io.vrap.rmf.base.client.ModelBase

public class CloudEventsPayloadImpl extends Object implements 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

    Constructors
    Constructor
    Description
    create empty instance
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    MessageDeliveryPayload, ResourceCreatedDeliveryPayload, ResourceUpdatedDeliveryPayload, or ResourceDeletedDeliveryPayload.
    The URI from which the message can be retrieved if messages are enabled.
    Unique identifier of the event.
    Corresponds to the sequenceNumber 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.
    Corresponds to the lastModifiedAt of the resource at the time the event was triggered.
    The type is namespaced with com.commercetools, followed by the ReferenceTypeId, the type of Subscription (either message or change), and the message or change type.
    int
     
    void
    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 the sequenceNumber of a MessageSubscription.
    void
    setSequencetype(String sequencetype)
    "Integer"
    void
    setSource(String source)
    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
    Corresponds to the lastModifiedAt of the resource at the time the event was triggered.
    void
    The type is namespaced with com.commercetools, followed by the ReferenceTypeId, the type of Subscription (either message or change), 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

      public String getSpecversion()

      The version of the CloudEvents specification which the event uses.

      Specified by:
      getSpecversion in interface CloudEventsPayload
      Returns:
      specversion
    • getId

      public String getId()

      Unique identifier of the event.

      Specified by:
      getId in interface CloudEventsPayload
      Returns:
      id
    • getType

      public String getType()

      The type is namespaced with com.commercetools, followed by the ReferenceTypeId, the type of Subscription (either message or change), and the message or change type. For example, com.commercetools.product.message.ProductPublished or com.commercetools.order.change.ResourceCreated.

      Specified by:
      getType in interface CloudEventsPayload
      Returns:
      type
    • getSource

      public String getSource()

      The default REST URI of the ReferenceTypeId that triggered this event, including the project key.

      Specified by:
      getSource in interface CloudEventsPayload
      Returns:
      source
    • getSubject

      public String getSubject()

      Unique identifier of the resource that triggered the event.

      Specified by:
      getSubject in interface CloudEventsPayload
      Returns:
      subject
    • getTime

      public ZonedDateTime getTime()

      Corresponds to the lastModifiedAt of the resource at the time the event was triggered.

      Specified by:
      getTime in interface CloudEventsPayload
      Returns:
      time
    • getSequence

      public String getSequence()

      Corresponds to the sequenceNumber of a MessageSubscription. Can be used to process messages in the correct order.

      Specified by:
      getSequence in interface CloudEventsPayload
      Returns:
      sequence
    • getSequencetype

      public String getSequencetype()

      "Integer"

      Specified by:
      getSequencetype in interface CloudEventsPayload
      Returns:
      sequencetype
    • getDataref

      public String getDataref()

      The URI from which the message can be retrieved if messages are enabled. Only set for MessageSubscriptions.

      Specified by:
      getDataref in interface CloudEventsPayload
      Returns:
      dataref
    • getData

      public DeliveryPayload getData()

      MessageDeliveryPayload, ResourceCreatedDeliveryPayload, ResourceUpdatedDeliveryPayload, or ResourceDeletedDeliveryPayload.

      Specified by:
      getData in interface CloudEventsPayload
      Returns:
      data
    • setSpecversion

      public void setSpecversion(String specversion)
      Description copied from interface: CloudEventsPayload

      The version of the CloudEvents specification which the event uses.

      Specified by:
      setSpecversion in interface CloudEventsPayload
      Parameters:
      specversion - value to be set
    • setId

      public void setId(String id)
      Description copied from interface: CloudEventsPayload

      Unique identifier of the event.

      Specified by:
      setId in interface CloudEventsPayload
      Parameters:
      id - value to be set
    • setType

      public void setType(String type)
      Description copied from interface: CloudEventsPayload

      The type is namespaced with com.commercetools, followed by the ReferenceTypeId, the type of Subscription (either message or change), and the message or change type. For example, com.commercetools.product.message.ProductPublished or com.commercetools.order.change.ResourceCreated.

      Specified by:
      setType in interface CloudEventsPayload
      Parameters:
      type - value to be set
    • setSource

      public void setSource(String source)
      Description copied from interface: CloudEventsPayload

      The default REST URI of the ReferenceTypeId that triggered this event, including the project key.

      Specified by:
      setSource in interface CloudEventsPayload
      Parameters:
      source - value to be set
    • setSubject

      public void setSubject(String subject)
      Description copied from interface: CloudEventsPayload

      Unique identifier of the resource that triggered the event.

      Specified by:
      setSubject in interface CloudEventsPayload
      Parameters:
      subject - value to be set
    • setTime

      public void setTime(ZonedDateTime time)
      Description copied from interface: CloudEventsPayload

      Corresponds to the lastModifiedAt of the resource at the time the event was triggered.

      Specified by:
      setTime in interface CloudEventsPayload
      Parameters:
      time - value to be set
    • setSequence

      public void setSequence(String sequence)
      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 interface CloudEventsPayload
      Parameters:
      sequence - value to be set
    • setSequencetype

      public void setSequencetype(String sequencetype)
      Description copied from interface: CloudEventsPayload

      "Integer"

      Specified by:
      setSequencetype in interface CloudEventsPayload
      Parameters:
      sequencetype - value to be set
    • setDataref

      public void setDataref(String dataref)
      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 interface CloudEventsPayload
      Parameters:
      dataref - value to be set
    • setData

      public void setData(DeliveryPayload data)
      Description copied from interface: CloudEventsPayload

      MessageDeliveryPayload, ResourceCreatedDeliveryPayload, ResourceUpdatedDeliveryPayload, or ResourceDeletedDeliveryPayload.

      Specified by:
      setData in interface CloudEventsPayload
      Parameters:
      data - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object