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.awscore.client.config;
17
18 import software.amazon.awssdk.annotations.SdkPublicApi;
19 import software.amazon.awssdk.awscore.client.builder.AwsClientBuilder;
20 import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration.Builder;
21 import software.amazon.awssdk.core.client.config.SdkAdvancedClientOption;
22 import software.amazon.awssdk.regions.Region;
23
24 /**
25 * A collection of advanced options that can be configured on an AWS client via
26 * {@link Builder#putAdvancedOption(SdkAdvancedClientOption, Object)}.
27 *
28 * <p>These options are usually not required outside of testing or advanced libraries, so most users should not need to configure
29 * them.</p>
30 *
31 * @param <T> The type of value associated with the option.
32 */
33 @SdkPublicApi
34 public final class AwsAdvancedClientOption<T> extends SdkAdvancedClientOption<T> {
35
36 /**
37 * Whether region detection should be enabled. Region detection is used when the {@link AwsClientBuilder#region(Region)} is
38 * not specified. This is enabled by default.
39 */
40 public static final AwsAdvancedClientOption<Boolean> ENABLE_DEFAULT_REGION_DETECTION =
41 new AwsAdvancedClientOption<>(Boolean.class);
42
43 private AwsAdvancedClientOption(Class<T> valueClass) {
44 super(valueClass);
45 }
46 }
47