DVCloudEvent class

One CloudEvent.

Constructors

DVCloudEvent({required String id, required String source, required String type, DateTime? time, String? subject, String? dataschema, String? datacontenttype, Object? data, Map<String, Object?> extensions = const <String, Object?>{}})
const

Properties

data → Object?
The decoded JSON value when datacontenttype is JSON or unset, the text when it is not, and the bytes of a structured event's data_base64.
final
datacontenttype → String?
The media type of data. Unset means JSON in structured mode.
final
dataschema → String?
final
extensions → Map<String, Object?>
Attributes the specification does not define, by name.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique per source; a consumer deduplicates on the pair.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → String
A URI-reference naming what produced the event.
final
subject → String?
final
time → DateTime?
final
type → String
The event's type, such as order.paid.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toHttp({DVCloudEventMode mode = DVCloudEventMode.structured}) → DVCloudEventMessage
This event as an HTTP request in mode.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromHttp({required Map<String, String> headers, required String body}) → DVCloudEvent
Reads a CloudEvent from an HTTP request, in either mode.

Constants

specversion → const String
The only version this reads and writes.