Class EventGridEvent


  • public class EventGridEvent
    extends Object
    Properties of an event published to an Event Grid topic.
    • Constructor Detail

      • EventGridEvent

        public EventGridEvent​(String id,
                              String subject,
                              Object data,
                              String eventType,
                              org.joda.time.DateTime eventTime,
                              String dataVersion)
        Creates an instance of EventGridEvent class.
        Parameters:
        id - an unique identifier for the event.
        subject - a resource path relative to the topic path.
        data - event data specific to the event type.
        eventType - the type of the event that occurred.
        eventTime - the time (in UTC) the event was generated.
        dataVersion - the schema version of the data object.
    • Method Detail

      • id

        public String id()
        Get an unique identifier for the event.
        Returns:
        the id value
      • topic

        public String topic()
        Get the resource path of the event source.
        Returns:
        the topic value
      • withTopic

        public EventGridEvent withTopic​(String topic)
        Set the resource path of the event source.
        Parameters:
        topic - the topic value to set
        Returns:
        the EventGridEvent object itself.
      • subject

        public String subject()
        Get a resource path relative to the topic path.
        Returns:
        the subject value
      • data

        public Object data()
        Get event data specific to the event type.
        Returns:
        the data value
      • eventType

        public String eventType()
        Get the type of the event that occurred.
        Returns:
        the eventType value
      • eventTime

        public org.joda.time.DateTime eventTime()
        Get the time (in UTC) the event was generated.
        Returns:
        the eventTime value
      • metadataVersion

        public String metadataVersion()
        Get the schema version of the event metadata.
        Returns:
        the metadataVersion value
      • dataVersion

        public String dataVersion()
        Get the schema version of the data object.
        Returns:
        the dataVersion value