Class HttpChecksumTrait
- java.lang.Object
-
- software.amazon.smithy.model.traits.AbstractTrait
-
- software.amazon.smithy.model.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. Contains request and response members that define the checksum behavior for operations HTTP Request and HTTP Response respectively.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpChecksumTrait.Builderstatic classHttpChecksumTrait.Provider
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpChecksumTrait.Builderbuilder()protected NodecreateNode()The result of toNode is used for hashCodes and equality.java.util.Set<java.lang.String>getRequestAlgorithms()Gets supported algorithms for request property defined within the HttpChecksum trait.java.util.List<HttpChecksumProperty>getRequestProperties()Gets request property defined within the HttpChecksum trait.java.util.List<HttpChecksumProperty>getRequestPropertiesForAlgorithm(java.lang.String algorithm)Gets checksum properties associated with the provided algorithm on request.java.util.Set<java.lang.String>getResponseAlgorithms()Gets supported algorithms for response property defined within the HttpChecksum trait.java.util.List<HttpChecksumProperty>getResponseProperties()Gets response property defined within the HttpChecksum trait.java.util.List<HttpChecksumProperty>getResponsePropertiesForAlgorithm(java.lang.String algorithm)Gets checksum properties associated with the provided algorithm on response.SmithyBuilder<HttpChecksumTrait>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, toNode, toShapeId, toString
-
-
-
-
Field Detail
-
ID
public static final ShapeId ID
-
-
Method Detail
-
builder
public static HttpChecksumTrait.Builder builder()
-
toBuilder
public SmithyBuilder<HttpChecksumTrait> toBuilder()
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToSmithyBuilder<HttpChecksumTrait>- Returns:
- a builder for type T
-
getRequestProperties
public java.util.List<HttpChecksumProperty> getRequestProperties()
Gets request property defined within the HttpChecksum trait.- Returns:
- Returns checksum properties for request.
-
getRequestAlgorithms
public java.util.Set<java.lang.String> getRequestAlgorithms()
Gets supported algorithms for request property defined within the HttpChecksum trait.- Returns:
- Returns all supported algorithms for request.
-
getRequestPropertiesForAlgorithm
public java.util.List<HttpChecksumProperty> getRequestPropertiesForAlgorithm(java.lang.String algorithm)
Gets checksum properties associated with the provided algorithm on request. Returns an empty list if algorithm is not supported on request.- Parameters:
algorithm- the algorithm on request property.- Returns:
- Returns an ordered list of HttpChecksumProperties.
-
getResponseProperties
public java.util.List<HttpChecksumProperty> getResponseProperties()
Gets response property defined within the HttpChecksum trait.- Returns:
- Returns checksum properties for response.
-
getResponseAlgorithms
public java.util.Set<java.lang.String> getResponseAlgorithms()
Gets supported algorithms for response property defined within the HttpChecksum trait.- Returns:
- Returns all supported algorithms for response.
-
getResponsePropertiesForAlgorithm
public java.util.List<HttpChecksumProperty> getResponsePropertiesForAlgorithm(java.lang.String algorithm)
Gets checksum properties associated with the provided algorithm on response. Returns an empty list if algorithm is not supported on response.- Parameters:
algorithm- the supported algorithm on response.- Returns:
- Returns an ordered list of HttpChecksumProperties.
-
createNode
protected Node createNode()
Description copied from class:AbstractTraitThe 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:
createNodein classAbstractTrait- Returns:
- Returns the trait as a node.
-
-