public class EventStreamUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
doesShapeContainsEventStream(ShapeModel parentShape,
ShapeModel childEventStreamShape)
Returns true if the #childEventStreamShape is a member of the #parentShape.
|
static Collection<OperationModel> |
findOperationsWithEventStream(IntermediateModel model,
ShapeModel eventStreamShape)
Returns the all operations that contain the given event stream shape.
|
static Optional<ShapeModel> |
getBaseEventStreamShape(IntermediateModel model,
ShapeModel eventShape)
Returns the event stream
ShapeModel that contains the given event. |
static List<ShapeModel> |
getBaseEventStreamShapes(IntermediateModel model,
ShapeModel eventShape) |
static Stream<MemberModel> |
getEventMembers(ShapeModel eventStreamShape)
Returns the stream of event members ('event: true') excluding exceptions
from the input event stream shape ('eventstream: true').
|
static Stream<MemberModel> |
getEvents(ShapeModel eventStreamShape)
Returns the stream of event members ('event: true') excluding exceptions
from the input event stream shape ('eventstream: true').
|
static ShapeModel |
getEventStreamInRequest(ShapeModel requestShape)
Get eventstream member from a request shape model.
|
static ShapeModel |
getEventStreamInResponse(ShapeModel responseShape)
Get eventstream member from a response shape model.
|
static boolean |
isEventStreamParentModel(ShapeModel shapeModel) |
static boolean |
isRequestEvent(IntermediateModel model,
ShapeModel eventShape)
Returns true if the given event shape is a sub-member of any operation request.
|
public static ShapeModel getEventStreamInRequest(ShapeModel requestShape)
requestShape - request shape of an operationpublic static ShapeModel getEventStreamInResponse(ShapeModel responseShape)
responseShape - response shape of an operationpublic static Optional<ShapeModel> getBaseEventStreamShape(IntermediateModel model, ShapeModel eventShape)
ShapeModel that contains the given event.model - Intermediate modeleventShape - shape with "event: true" traitpublic static List<ShapeModel> getBaseEventStreamShapes(IntermediateModel model, ShapeModel eventShape)
public static Stream<MemberModel> getEvents(ShapeModel eventStreamShape)
public static Stream<MemberModel> getEventMembers(ShapeModel eventStreamShape)
public static Collection<OperationModel> findOperationsWithEventStream(IntermediateModel model, ShapeModel eventStreamShape)
public static boolean doesShapeContainsEventStream(ShapeModel parentShape, ShapeModel childEventStreamShape)
public static boolean isRequestEvent(IntermediateModel model, ShapeModel eventShape)
public static boolean isEventStreamParentModel(ShapeModel shapeModel)
Copyright © 2023. All rights reserved.