Class HttpChecksumTrait
java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.aws.traits.HttpChecksumTrait
- All Implemented Interfaces:
software.amazon.smithy.model.FromSourceLocation
,software.amazon.smithy.model.node.ToNode
,software.amazon.smithy.model.shapes.ToShapeId
,software.amazon.smithy.model.traits.Trait
,software.amazon.smithy.utils.ToSmithyBuilder<HttpChecksumTrait>
public final class HttpChecksumTrait
extends software.amazon.smithy.model.traits.AbstractTrait
implements software.amazon.smithy.utils.ToSmithyBuilder<HttpChecksumTrait>
Indicates that an operation supports checksum validation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpChecksumTrait.Builder
builder()
protected software.amazon.smithy.model.node.Node
static String
getChecksumLocationName
(String checksumAlgorithm) Gets the normalized location name for a checksum algorithm.Optionally gets name of the input member used to specify which request checksum to send.Optionally gets name of the input member used to specify opt-in behavior for response checksum validation.Gets list of checksum algorithms for which checksum values when present in HTTP response should be validated.boolean
Returns true if request requires checksum to be present.software.amazon.smithy.utils.SmithyBuilder<HttpChecksumTrait>
Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.smithy.model.traits.Trait
isSynthetic
-
Field Details
-
ID
public static final software.amazon.smithy.model.shapes.ShapeId ID -
CHECKSUM_PREFIX
- See Also:
-
CHECKSUM_ALGORITHMS
-
VALIDATION_MODES
-
REQUEST_CHECKSUM_REQUIRED
- See Also:
-
REQUEST_ALGORITHM_MEMBER
- See Also:
-
REQUEST_VALIDATION_MODE_MEMBER
- See Also:
-
RESPONSE_ALGORITHMS
- See Also:
-
-
Method Details
-
builder
-
toBuilder
- Specified by:
toBuilder
in interfacesoftware.amazon.smithy.utils.ToSmithyBuilder<HttpChecksumTrait>
-
isRequestChecksumRequired
public boolean isRequestChecksumRequired()Returns true if request requires checksum to be present.- Returns:
- Returns if checksum is required.
-
getRequestAlgorithmMember
Optionally gets name of the input member used to specify which request checksum to send.- Returns:
- Returns optional input member name.
-
getResponseAlgorithms
Gets list of checksum algorithms for which checksum values when present in HTTP response should be validated.- Returns:
- Returns checksum properties for response.
-
getRequestValidationModeMember
Optionally gets name of the input member used to specify opt-in behavior for response checksum validation.- Returns:
- Returns optional input member name.
-
getChecksumLocationName
Gets the normalized location name for a checksum algorithm.- Parameters:
checksumAlgorithm
- The algorithm to get a location name of.- Returns:
- The normalized location name.
-
createNode
protected software.amazon.smithy.model.node.Node createNode()- Specified by:
createNode
in classsoftware.amazon.smithy.model.traits.AbstractTrait
-