Interface UploadRequest.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<UploadRequest.Builder,,UploadRequest> SdkBuilder<UploadRequest.Builder,UploadRequest>
- Enclosing class:
UploadRequest
@NotThreadSafe
public static interface UploadRequest.Builder
extends CopyableBuilder<UploadRequest.Builder,UploadRequest>
A builder for a
UploadRequest, created with UploadRequest.builder()-
Method Summary
Modifier and TypeMethodDescriptionaddTransferListener(TransferListener transferListener) Add aTransferListenerthat will be notified as part of this request.build()An immutable object that is created from the properties that have been set on the builder.default UploadRequest.BuilderputObjectRequest(Consumer<PutObjectRequest.Builder> putObjectRequestBuilder) Configure thePutObjectRequestthat should be used for the uploadputObjectRequest(PutObjectRequest putObjectRequest) Configure thePutObjectRequestthat should be used for the uploadrequestBody(AsyncRequestBody requestBody) TheAsyncRequestBodycontaining the data to send to the service.transferListeners(Collection<TransferListener> transferListeners) TheTransferListeners that will be notified as part of this request.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Method Details
-
requestBody
TheAsyncRequestBodycontaining the data to send to the service. Request bodies may be declared using one of the static factory methods in theAsyncRequestBodyclass.- Parameters:
requestBody- the request body- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
putObjectRequest
Configure thePutObjectRequestthat should be used for the upload- Parameters:
putObjectRequest- the putObjectRequest- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
putObjectRequest
default UploadRequest.Builder putObjectRequest(Consumer<PutObjectRequest.Builder> putObjectRequestBuilder) Configure thePutObjectRequestthat should be used for the uploadThis is a convenience method that creates an instance of the
PutObjectRequestbuilder avoiding the need to create one manually viaPutObjectRequest.builder().- Parameters:
putObjectRequestBuilder- the putObjectRequest consumer builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
transferListeners
TheTransferListeners that will be notified as part of this request. This method overrides and replaces any transferListeners that have already been set. Add an optional request override configuration.- Parameters:
transferListeners- the collection of transferListeners- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
addTransferListener
Add aTransferListenerthat will be notified as part of this request.- Parameters:
transferListener- the transferListener to add- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
build
UploadRequest build()Description copied from interface:SdkBuilderAn immutable object that is created from the properties that have been set on the builder.- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<UploadRequest.Builder,UploadRequest> - Returns:
- The built request.
-