use of software.amazon.awssdk.core.waiters.Waiter in project aws-sdk-java-v2 by aws.
the class DefaultQueryWaiter method applyWaitersUserAgent.
private <T extends QueryRequest> T applyWaitersUserAgent(T request) {
Consumer<AwsRequestOverrideConfiguration.Builder> userAgentApplier = b -> b.addApiName(ApiName.builder().version("waiter").name("hll").build());
AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration().map(c -> c.toBuilder().applyMutation(userAgentApplier).build()).orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build()));
return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build();
}
Aggregations