public static interface DownloadRequest.UntypedBuilder
DownloadRequest.builder() return an DownloadRequest.UntypedBuilder, where the builder is not yet
parameterized with the generic type associated with DownloadRequest. This prevents the otherwise awkward syntax of
having to explicitly cast the builder type, e.g.,
DownloadRequest.<ResponseBytes<GetObjectResponse>>builder()
Instead, the type may be inferred as part of specifying the responseTransformer(AsyncResponseTransformer)
parameter, at which point the builder chain will return a new DownloadRequest.TypedBuilder.DownloadRequest.UntypedBuilder getObjectRequest(GetObjectRequest getObjectRequest)
GetObjectRequest request that should be used for the downloadgetObjectRequest - the getObject requestgetObjectRequest(Consumer)default DownloadRequest.UntypedBuilder getObjectRequest(Consumer<GetObjectRequest.Builder> getObjectRequestBuilder)
GetObjectRequest request that should be used for the download
This is a convenience method that creates an instance of the GetObjectRequest builder, avoiding the need to
create one manually via GetObjectRequest.builder().
getObjectRequestBuilder - the getObject requestgetObjectRequest(GetObjectRequest)DownloadRequest.UntypedBuilder overrideConfiguration(TransferRequestOverrideConfiguration configuration)
configuration - The override configuration.default DownloadRequest.UntypedBuilder overrideConfiguration(Consumer<TransferRequestOverrideConfiguration.Builder> configurationBuilder)
overrideConfiguration(TransferRequestOverrideConfiguration), but takes a lambda to configure a new
TransferRequestOverrideConfiguration.Builder. This removes the need to call TransferRequestOverrideConfiguration.builder() and TransferRequestOverrideConfiguration.Builder.build().configurationBuilder - the upload configurationoverrideConfiguration(TransferRequestOverrideConfiguration)<T> DownloadRequest.TypedBuilder<T> responseTransformer(AsyncResponseTransformer<GetObjectResponse,T> responseTransformer)
AsyncResponseTransformer that should be used for the download. This method also infers the
generic type of DownloadRequest to create, inferred from the second type parameter of the provided AsyncResponseTransformer. E.g, specifying AsyncResponseTransformer.toBytes() would result in inferring the
type of the DownloadRequest to be of ResponseBytes<GetObjectResponse>. See the static factory methods
available in AsyncResponseTransformer.T - the type of DownloadRequest to createresponseTransformer - the AsyncResponseTransformerAsyncResponseTransformerdefault <T> DownloadRequest.TypedBuilder<T> applyMutation(Function<DownloadRequest.UntypedBuilder,DownloadRequest.TypedBuilder<T>> mutator)
SdkBuilder.applyMutation(Consumer), but accepts a Function that upgrades this DownloadRequest.UntypedBuilder to a DownloadRequest.TypedBuilder. Therefore, the function must also call responseTransformer(AsyncResponseTransformer) to specify the generic type.Copyright © 2022. All rights reserved.