Interface ResponseEnvelope
- All Known Subinterfaces:
ResponseEnvelope.Statement, ResponseEnvelope.Suggestion
public sealed interface ResponseEnvelope
permits ResponseEnvelope.Statement, ResponseEnvelope.Suggestion
Structured reply shape produced by inline assist sessions. Two variants, each with its own
accessors:
ResponseEnvelope.Statement— informational reply. ExposesResponseEnvelope.Statement.text()only.ResponseEnvelope.Suggestion— apply-able reply. ExposesResponseEnvelope.Suggestion.description()(prose) andResponseEnvelope.Suggestion.value()(host-interpreted payload: literal code for a script editor, a JSON payload for a property-grid editor, the literal SQL for a query browser, etc.).
Consumers pattern-switch on the sealed type; matching is exhaustive without a default
branch:
switch (envelope) {
case ResponseEnvelope.Statement s -> renderStatement(s.text());
case ResponseEnvelope.Suggestion s -> renderSuggestion(s.description(), s.value());
}
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProse-only informational reply.static interfaceApply-able reply — prose plus a host-interpreted payload.