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 aTransferListener
that 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.Builder
putObjectRequest
(Consumer<PutObjectRequest.Builder> putObjectRequestBuilder) Configure thePutObjectRequest
that should be used for the uploadputObjectRequest
(PutObjectRequest putObjectRequest) Configure thePutObjectRequest
that should be used for the uploadrequestBody
(AsyncRequestBody requestBody) TheAsyncRequestBody
containing the data to send to the service.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
-
Method Details
-
requestBody
TheAsyncRequestBody
containing the data to send to the service. Request bodies may be declared using one of the static factory methods in theAsyncRequestBody
class.- Parameters:
requestBody
- the request body- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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
default UploadRequest.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:
-
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:
-
addTransferListener
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:
-
build
UploadRequest build()Description copied from interface:SdkBuilder
An immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceBuildable
- Specified by:
build
in interfaceSdkBuilder<UploadRequest.Builder,
UploadRequest> - Returns:
- The built request.
-