Class 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.
    • Field Detail

      • ID

        public static final software.amazon.smithy.model.shapes.ShapeId ID
      • 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

      • toBuilder

        public software.amazon.smithy.utils.SmithyBuilder<HttpChecksumTrait> toBuilder()
        Specified by:
        toBuilder in interface software.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

        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 software.amazon.smithy.model.node.Node createNode()
        Specified by:
        createNode in class software.amazon.smithy.model.traits.AbstractTrait