Class StreamEvent
-
- All Implemented Interfaces:
public final class StreamEventServer-Sent Event emitted during streaming responses. Events are sent as
event: <status>\ndata: <JSON>\n\n, where the JSON payload has the shape{ data, type, id }.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classStreamEvent.BuilderA builder for StreamEvent.
public final classStreamEvent.Datapublic final classStreamEvent.TypeType of stream event - system events or log messages
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for this event final StreamEvent.Datadata()final StreamEvent.Typetype()Type of stream event - system events or log messages final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<StreamEvent.Data>_data()Returns the raw JSON value of data. final JsonField<StreamEvent.Type>_type()Returns the raw JSON value of type. final Map<String, JsonValue>_additionalProperties()final StreamEvent.BuildertoBuilder()final StreamEventvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static StreamEvent.Builderbuilder()Returns a mutable builder for constructing an instance of StreamEvent. -
-
Method Detail
-
data
final StreamEvent.Data data()
-
type
final StreamEvent.Type type()
Type of stream event - system events or log messages
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_data
final JsonField<StreamEvent.Data> _data()
Returns the raw JSON value of data.
Unlike data, this method doesn't throw if the JSON field has an unexpected type.
-
_type
final JsonField<StreamEvent.Type> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final StreamEvent.Builder toBuilder()
-
validate
final StreamEvent validate()
-
builder
final static StreamEvent.Builder builder()
Returns a mutable builder for constructing an instance of StreamEvent.
The following fields are required:
.id() .data() .type()
-
-
-
-