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.Builder
addTransferListener(TransferListener transferListener)
Add aTransferListener
that will be notified as part of this request.default UploadFileRequest.Builder
putObjectRequest(Consumer<PutObjectRequest.Builder> putObjectRequestBuilder)
Configure thePutObjectRequest
that should be used for the uploadUploadFileRequest.Builder
putObjectRequest(PutObjectRequest putObjectRequest)
Configure thePutObjectRequest
that should be used for the uploaddefault UploadFileRequest.Builder
source(File source)
The file containing data to send to the service.UploadFileRequest.Builder
source(Path source)
ThePath
to file containing data to send to the service.UploadFileRequest.Builder
transferListeners(Collection<TransferListener> transferListeners)
TheTransferListener
s 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)
ThePath
to 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 thePutObjectRequest
that 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 thePutObjectRequest
that should be used for the uploadThis is a convenience method that creates an instance of the
PutObjectRequest
builder 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)
TheTransferListener
s 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 aTransferListener
that 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
-
-