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.client.config;
17
18 import software.amazon.awssdk.annotations.SdkPublicApi;
19 import software.amazon.awssdk.core.signer.Signer;
20
21
22 /**
23 * A collection of advanced options that can be configured on an AWS client via
24 * {@link ClientOverrideConfiguration.Builder#putAdvancedOption(SdkAdvancedClientOption, Object)}.
25 *
26 * <p>These options are usually not required outside of testing or advanced libraries, so most users should not need to configure
27 * them.</p>
28 *
29 * @param <T> The type of value associated with the option.
30 */
31 @SdkPublicApi
32 public class SdkAdvancedClientOption<T> extends ClientOption<T> {
33 /**
34 * Set the prefix of the user agent that is sent with each request to AWS.
35 */
36 public static final SdkAdvancedClientOption<String> USER_AGENT_PREFIX = new SdkAdvancedClientOption<>(String.class);
37
38 /**
39 * Set the suffix of the user agent that is sent with each request to AWS.
40 */
41 public static final SdkAdvancedClientOption<String> USER_AGENT_SUFFIX = new SdkAdvancedClientOption<>(String.class);
42
43 /**
44 * Define the signer that should be used when authenticating with AWS.
45 */
46 public static final SdkAdvancedClientOption<Signer> SIGNER = new SdkAdvancedClientOption<>(Signer.class);
47
48
49 /**
50 * SDK uses endpoint trait and hostPrefix trait specified in service model to modify
51 * the endpoint host that the API request is sent to.
52 *
53 * Customers can set this value to True to disable the behavior.
54 */
55 public static final SdkAdvancedClientOption<Boolean> DISABLE_HOST_PREFIX_INJECTION =
56 new SdkAdvancedClientOption<>(Boolean.class);
57
58 protected SdkAdvancedClientOption(Class<T> valueClass) {
59 super(valueClass);
60 }
61 }
62