• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  *  http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 package software.amazon.awssdk.core.checksums;
17 
18 import software.amazon.awssdk.annotations.SdkPublicApi;
19 import software.amazon.awssdk.core.interceptor.Context;
20 import software.amazon.awssdk.core.interceptor.ExecutionAttributes;
21 import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
22 import software.amazon.awssdk.core.interceptor.SdkExecutionAttribute;
23 
24 /**
25  * Enum to indicate the checksum validation is performed on a Response that supports Http Checksum Validation.
26  * The status of Checksum validation can be obtained by accessing {@link SdkExecutionAttribute#HTTP_RESPONSE_CHECKSUM_VALIDATION}
27  * on an execution context by using
28  * {@link ExecutionInterceptor#afterExecution(Context.AfterExecution, ExecutionAttributes)}.
29  * Possible Checksum Validations
30  * {@link #VALIDATED}
31  * {@link #FORCE_SKIP}
32  * {@link #CHECKSUM_ALGORITHM_NOT_FOUND}
33  * {@link #CHECKSUM_RESPONSE_NOT_FOUND}
34  *
35  */
36 @SdkPublicApi
37 public enum ChecksumValidation {
38     /**
39      * Checksum validation was performed on the response.
40      */
41     VALIDATED,
42 
43     /**
44      * Checksum validation was skipped since response has customization for specific checksum values.
45      */
46     FORCE_SKIP,
47 
48     /**
49      * Response has checksum mode enabled but Algorithm was not found in client.
50      */
51     CHECKSUM_ALGORITHM_NOT_FOUND,
52 
53     /**
54      * Response has checksum mode enabled but response header did not have checksum.
55      */
56     CHECKSUM_RESPONSE_NOT_FOUND,
57 }
58