public class EventGridEvent extends Object
| Constructor and Description |
|---|
EventGridEvent(String id,
String subject,
Object data,
String eventType,
org.joda.time.DateTime eventTime,
String dataVersion)
Creates an instance of EventGridEvent class.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
data()
Get event data specific to the event type.
|
String |
dataVersion()
Get the schema version of the data object.
|
org.joda.time.DateTime |
eventTime()
Get the time (in UTC) the event was generated.
|
String |
eventType()
Get the type of the event that occurred.
|
String |
id()
Get an unique identifier for the event.
|
String |
metadataVersion()
Get the schema version of the event metadata.
|
String |
subject()
Get a resource path relative to the topic path.
|
String |
topic()
Get the resource path of the event source.
|
EventGridEvent |
withTopic(String topic)
Set the resource path of the event source.
|
public EventGridEvent(String id, String subject, Object data, String eventType, org.joda.time.DateTime eventTime, String dataVersion)
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.public String id()
public String topic()
public EventGridEvent withTopic(String topic)
topic - the topic value to setpublic String subject()
public Object data()
public String eventType()
public org.joda.time.DateTime eventTime()
public String metadataVersion()
public String dataVersion()
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/