Class EventStreamIndex

java.lang.Object
software.amazon.smithy.model.knowledge.EventStreamIndex
All Implemented Interfaces:
KnowledgeIndex

public final class EventStreamIndex extends Object implements KnowledgeIndex
Index of operation shapes to event stream information.

This knowledge index provides information about event streams in operations, including the input/output member that contains an event stream, the shape targeted by this member, and any additional input/output members that form the initial message.

  • Constructor Details

    • EventStreamIndex

      public EventStreamIndex(Model model)
  • Method Details

    • of

      public static EventStreamIndex of(Model model)
    • getInputInfo

      public Optional<EventStreamInfo> getInputInfo(ToShapeId operationShape)
      Get event stream information for the input of an operation.

      No result is returned if the provided operation shape does not exist, if the targeted shape is not an operation, if the operation does not contain an input structure or if the input structure does not contain an input event stream.

      Parameters:
      operationShape - Operation or shape ID to retrieve information for.
      Returns:
      Returns the optionally found input event stream information.
    • getOutputInfo

      public Optional<EventStreamInfo> getOutputInfo(ToShapeId operationShape)
      Get event stream information for the output of an operation.

      No result is returned if the provided operation shape does not exist, if the targeted shape is not an operation, if the operation does not contain an output structure or if the output structure does not contain an output event stream.

      Parameters:
      operationShape - Operation or shape ID to retrieve information for.
      Returns:
      Returns the optionally found output event stream information.