Class EventStreamInfo


  • public final class EventStreamInfo
    extends java.lang.Object
    Contains extracted event stream information.
    • Method Detail

      • getOperation

        public OperationShape getOperation()
        Gets the operation associated with this data.
        Returns:
        Returns the associated operation.
      • getStreamingTrait

        public StreamingTrait getStreamingTrait()
        Gets the event stream trait.
        Returns:
        Returns the event stream trait.
      • getStructure

        public StructureShape getStructure()
        Gets the input or output structure of the data.
        Returns:
        Returns the structure.
      • getEventStreamMember

        public MemberShape getEventStreamMember()
        Gets the top-level input or output member that targets the event stream.
        Returns:
        Returns the member.
      • getEventStreamTarget

        public Shape getEventStreamTarget()
        Gets the shape that is streamed over the event stream.

        If the target shape is a structure, then the event stream is a single-event event stream that streams events of a single shape. If the target shape is a union, then the event stream is a multi-event event stream that streams one or more named events of various structure shapes.

        Returns:
        Returns a structure or union shape.
      • getInitialMessageMembers

        public java.util.Map<java.lang.String,​MemberShape> getInitialMessageMembers()
        Gets the initial message members that form the initial-request or initial-response of the event stream.

        The initial message members are the members of the input or output of an operation that are not the target of an event stream.

        The returned map is a map of member names to MemberShapes. Use getInitialMessageTargets() to get a mapping of member names to the shapes targeted by a member.

        
         EventStreamIndex index = EventStreamIndex.of(model);
         EventStreamInfo info = index.getInputInfo(myShapeId);
        
         for (MemberShape member : info.getInitialMessageMembers()) {
             System.out.println("Initial message member: " + member);
         }
         
        Returns:
        Returns the initial event members (if any).
      • getInitialMessageTargets

        public java.util.Map<java.lang.String,​Shape> getInitialMessageTargets()
        Gets the shapes targeted by the initial message members that are not the target of an event stream.

        The returned map contains the same information as getInitialMessageMembers() except each value is the shape targeted by the member.

        Returns:
        Returns the shapes targeted by the initial message members.
        See Also:
        getInitialMessageMembers()
      • hasInitialMessage

        public boolean hasInitialMessage()
        Returns true if the event stream has an initial-message, meaning there are top-level members of the input or output of the operation that are not the event stream member.
        Returns:
        Returns true if there is an initial message.
      • getEvents

        public java.util.Map<java.lang.String,​StructureShape> getEvents()
        Gets all of the event stream events of the event stream.

        The returned map is a mapping of the event name to the event. For multi-event event streams, the name of hte event is the member name of the multi-event union. For single-event event streams, the name of the event is the name of the input or output structure member referenced by the event stream trait.

        Returns:
        Returns a map of event stream events.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object