• 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"). You may not use this file except in compliance with
5  * the License. A copy of the License is located at
6  *
7  * http://aws.amazon.com/apache2.0
8  *
9  * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11  * and limitations under the License.
12  */
13 
14 package software.amazon.awssdk.services.kms;
15 
16 import software.amazon.awssdk.annotations.Generated;
17 import software.amazon.awssdk.annotations.SdkInternalApi;
18 import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
19 import software.amazon.awssdk.core.client.config.SdkClientOption;
20 import software.amazon.awssdk.services.kms.endpoints.KmsEndpointProvider;
21 
22 /**
23  * Internal implementation of {@link KmsAsyncClientBuilder}.
24  */
25 @Generated("software.amazon.awssdk:codegen")
26 @SdkInternalApi
27 final class DefaultKmsAsyncClientBuilder extends DefaultKmsBaseClientBuilder<KmsAsyncClientBuilder, KmsAsyncClient> implements
28         KmsAsyncClientBuilder {
29     @Override
endpointProvider(KmsEndpointProvider endpointProvider)30     public DefaultKmsAsyncClientBuilder endpointProvider(KmsEndpointProvider endpointProvider) {
31         clientConfiguration.option(SdkClientOption.ENDPOINT_PROVIDER, endpointProvider);
32         return this;
33     }
34 
35     @Override
buildClient()36     protected final KmsAsyncClient buildClient() {
37         SdkClientConfiguration clientConfiguration = super.asyncClientConfiguration();
38         this.validateClientOptions(clientConfiguration);
39         KmsAsyncClient client = new DefaultKmsAsyncClient(clientConfiguration);
40         return client;
41     }
42 }
43