private boolean endpointDiscoveryEnabled() {

        Boolean endpointDiscoveryChainSetting = DEFAULT_ENDPOINT_DISCOVERY_PROVIDER.endpointDiscoveryEnabled();

        if (endpointDiscoveryDisabled) {
            return false;
        }

        if (endpointDiscoveryEnabled) {
            return true;
        }

        if (endpointDiscoveryChainSetting != null && endpointDiscoveryChainSetting == false) {
            return false;
        }

        if (endpointDiscoveryChainSetting != null && endpointDiscoveryChainSetting) {
            return true;
        }

        if (InternalConfig.Factory.getInternalConfig().endpointDiscoveryEnabled()) {
            return true;
        }

        return false;
    }
@return Default async client using the {@link com.amazonaws.auth.DefaultAWSCredentialsProviderChain} and
        {@link com.amazonaws.regions.DefaultAwsRegionProviderChain} chain
aws-java-sdk-timestreamquery/src/main/java/com/amazonaws/services/timestreamquery/AmazonTimestreamQueryAsyncClientBuilder.java