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 a UploadFileRequest, created with UploadFileRequest.builder()
  • Method Details

    • source

      The Path 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 the PutObjectRequest 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 UploadFileRequest.Builder putObjectRequest(Consumer<PutObjectRequest.Builder> putObjectRequestBuilder)
      Configure the PutObjectRequest that should be used for the upload

      This is a convenience method that creates an instance of the PutObjectRequest builder avoiding the need to create one manually via PutObjectRequest.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

      UploadFileRequest.Builder transferListeners(Collection<TransferListener> transferListeners)
      The TransferListeners 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

      UploadFileRequest.Builder addTransferListener(TransferListener transferListener)
      Add a TransferListener 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: