Class HttpChecksumTrait
- java.lang.Object
-
- software.amazon.smithy.model.traits.AbstractTrait
-
- software.amazon.smithy.aws.traits.HttpChecksumTrait
-
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,ToShapeId
,Trait
,ToSmithyBuilder<HttpChecksumTrait>
public final class HttpChecksumTrait extends AbstractTrait implements ToSmithyBuilder<HttpChecksumTrait>
Indicates that an operation supports checksum validation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpChecksumTrait.Builder
static class
HttpChecksumTrait.Provider
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>
CHECKSUM_ALGORITHMS
static java.lang.String
CHECKSUM_PREFIX
static ShapeId
ID
static java.lang.String
REQUEST_ALGORITHM_MEMBER
static java.lang.String
REQUEST_CHECKSUM_REQUIRED
static java.lang.String
REQUEST_VALIDATION_MODE_MEMBER
static java.lang.String
RESPONSE_ALGORITHMS
static java.util.List<java.lang.String>
VALIDATION_MODES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpChecksumTrait.Builder
builder()
protected Node
createNode()
The result of toNode is used for hashCodes and equality.static java.lang.String
getChecksumLocationName(java.lang.String checksumAlgorithm)
Gets the normalized location name for a checksum algorithm.java.util.Optional<java.lang.String>
getRequestAlgorithmMember()
Optionally gets name of the input member used to specify which request checksum to send.java.util.Optional<java.lang.String>
getRequestValidationModeMember()
Optionally gets name of the input member used to specify opt-in behavior for response checksum validation.java.util.List<java.lang.String>
getResponseAlgorithms()
Gets list of checksum algorithms for which checksum values when present in HTTP response should be validated.boolean
isRequestChecksumRequired()
Returns true if request requires checksum to be present.HttpChecksumTrait.Builder
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.-
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 Detail
-
ID
public static final ShapeId ID
-
CHECKSUM_PREFIX
public static final java.lang.String CHECKSUM_PREFIX
- See Also:
- Constant Field Values
-
CHECKSUM_ALGORITHMS
public static final java.util.List<java.lang.String> CHECKSUM_ALGORITHMS
-
VALIDATION_MODES
public static final java.util.List<java.lang.String> VALIDATION_MODES
-
REQUEST_CHECKSUM_REQUIRED
public static final java.lang.String REQUEST_CHECKSUM_REQUIRED
- See Also:
- Constant Field Values
-
REQUEST_ALGORITHM_MEMBER
public static final java.lang.String REQUEST_ALGORITHM_MEMBER
- See Also:
- Constant Field Values
-
REQUEST_VALIDATION_MODE_MEMBER
public static final java.lang.String REQUEST_VALIDATION_MODE_MEMBER
- See Also:
- Constant Field Values
-
RESPONSE_ALGORITHMS
public static final java.lang.String RESPONSE_ALGORITHMS
- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
public static HttpChecksumTrait.Builder builder()
-
toBuilder
public HttpChecksumTrait.Builder toBuilder()
Description copied from interface:ToSmithyBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<HttpChecksumTrait>
- Returns:
- a builder for type T
-
isRequestChecksumRequired
public boolean isRequestChecksumRequired()
Returns true if request requires checksum to be present.- Returns:
- Returns if checksum is required.
-
getRequestAlgorithmMember
public java.util.Optional<java.lang.String> getRequestAlgorithmMember()
Optionally gets name of the input member used to specify which request checksum to send.- Returns:
- Returns optional input member name.
-
getResponseAlgorithms
public java.util.List<java.lang.String> 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
public java.util.Optional<java.lang.String> 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
public static java.lang.String getChecksumLocationName(java.lang.String checksumAlgorithm)
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 Node createNode()
Description copied from class:AbstractTrait
The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.- Specified by:
createNode
in classAbstractTrait
- Returns:
- Returns the trait as a node.
-
-