Interface UploadFileRequest.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<UploadFileRequest.Builder,UploadFileRequest>,SdkBuilder<UploadFileRequest.Builder,UploadFileRequest>
- Enclosing class:
- UploadFileRequest
@NotThreadSafe public static interface UploadFileRequest.Builder extends CopyableBuilder<UploadFileRequest.Builder,UploadFileRequest>
A builder for aUploadFileRequest, created withUploadFileRequest.builder()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description UploadFileRequest.BuilderaddTransferListener(TransferListener transferListener)Add aTransferListenerthat will be notified as part of this request.default UploadFileRequest.BuilderputObjectRequest(Consumer<PutObjectRequest.Builder> putObjectRequestBuilder)Configure thePutObjectRequestthat should be used for the uploadUploadFileRequest.BuilderputObjectRequest(PutObjectRequest putObjectRequest)Configure thePutObjectRequestthat should be used for the uploaddefault UploadFileRequest.Buildersource(File source)The file containing data to send to the service.UploadFileRequest.Buildersource(Path source)ThePathto file containing data to send to the service.UploadFileRequest.BuildertransferListeners(Collection<TransferListener> transferListeners)TheTransferListeners that will be notified as part of this request.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
-
-
-
Method Detail
-
source
UploadFileRequest.Builder source(Path source)
ThePathto file containing data to send to the service. File will be read entirely and may be read multiple times in the event of a retry. If the file does not exist or the current user does not have access to read it then an exception will be thrown.- Parameters:
source- the source path- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
source
default UploadFileRequest.Builder source(File source)
The file containing data to send to the service. File will be read entirely and may be read multiple times in the event of a retry. If the file does not exist or the current user does not have access to read it then an exception will be thrown.- Parameters:
source- the source path- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
putObjectRequest
UploadFileRequest.Builder putObjectRequest(PutObjectRequest 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(Consumer)
-
putObjectRequest
default UploadFileRequest.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:
putObjectRequest(PutObjectRequest)
-
transferListeners
UploadFileRequest.Builder transferListeners(Collection<TransferListener> 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:
TransferListener
-
addTransferListener
UploadFileRequest.Builder addTransferListener(TransferListener transferListener)
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:
TransferListener
-
-