Class CreatePresignedUploadRequest

java.lang.Object
io.micronaut.objectstorage.request.CreatePresignedUploadRequest

public final class CreatePresignedUploadRequest extends Object
Request to create a pre-signed upload for a single object key.
Since:
3.0.0
  • Constructor Details

    • CreatePresignedUploadRequest

      public CreatePresignedUploadRequest(@NonNull String key, @NonNull Duration expiresIn)
      Parameters:
      key - the object key to be uploaded
      expiresIn - the signature validity duration
  • Method Details

    • getKey

      public @NonNull String getKey()
      Returns:
      the object key to be uploaded
    • getExpiresIn

      public @NonNull Duration getExpiresIn()
      Returns:
      the signature validity duration
    • getContentType

      public @NonNull Optional<String> getContentType()
      Returns:
      the content type required by the signed upload, if present
    • setContentType

      public void setContentType(@NonNull String contentType)
      Parameters:
      contentType - the content type required by the signed upload
    • getContentLength

      public @NonNull Optional<Long> getContentLength()
      Returns:
      the content length required by the signed upload, if present
    • setContentLength

      public void setContentLength(long contentLength)
      Parameters:
      contentLength - the content length required by the signed upload
    • getMetadata

      public @NonNull Map<String,String> getMetadata()
      Returns:
      metadata to include in the signed upload request
    • setMetadata

      public void setMetadata(@NonNull Map<String,String> metadata)
      Parameters:
      metadata - metadata to include in the signed upload request