Class StreamingTrait
- java.lang.Object
-
- software.amazon.smithy.model.traits.AnnotationTrait
-
- software.amazon.smithy.model.traits.StreamingTrait
-
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,ToShapeId
,Trait
public final class StreamingTrait extends AnnotationTrait
Indicates that the data stored in the shape is very large and should not be stored in memory, or that the size of the data stored in the shape is unknown at the start of a request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StreamingTrait.Provider
-
Constructor Summary
Constructors Constructor Description StreamingTrait()
StreamingTrait(ObjectNode node)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isEventStream(Model model, MemberShape member)
Determines whether a given member targets an event stream.static boolean
isEventStream(Shape shape)
Determines whether a given shape is an event stream.-
Methods inherited from class software.amazon.smithy.model.traits.AnnotationTrait
equals, getSourceLocation, hashCode, toNode, toShapeId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.smithy.model.traits.Trait
isSynthetic
-
-
-
-
Field Detail
-
ID
public static final ShapeId ID
-
-
Constructor Detail
-
StreamingTrait
public StreamingTrait(ObjectNode node)
-
StreamingTrait
public StreamingTrait()
-
-
Method Detail
-
isEventStream
public static boolean isEventStream(Shape shape)
Determines whether a given shape is an event stream.- Parameters:
shape
- The shape to check.- Returns:
- True if the shape is a union and has the streaming trait.
-
isEventStream
public static boolean isEventStream(Model model, MemberShape member)
Determines whether a given member targets an event stream.- Parameters:
model
- The model containing the member and its target.member
- The member whose target should be checked.- Returns:
- True if the member targets a union with the streaming trait.
-
-