Class CreateMultipartUploadRequest.Builder

java.lang.Object
com.google.cloud.storage.multipartupload.model.CreateMultipartUploadRequest.Builder
Enclosing class:
CreateMultipartUploadRequest

@BetaApi public static final class CreateMultipartUploadRequest.Builder extends Object
Since:
2.60.0 This new api is in preview and is subject to breaking changes.
  • Method Details

    • bucket

      @BetaApi public CreateMultipartUploadRequest.Builder bucket(String bucket)
      The bucket to which the object is being uploaded.
      Parameters:
      bucket - The bucket name
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • key

      @BetaApi public CreateMultipartUploadRequest.Builder key(String key)
      The name of the object.
      Parameters:
      key - The object name
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
      See Also:
    • cannedAcl

      @BetaApi public CreateMultipartUploadRequest.Builder cannedAcl(Storage.PredefinedAcl cannedAcl)
      A canned ACL to apply to the object.
      Parameters:
      cannedAcl - The canned ACL
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • contentType

      @BetaApi public CreateMultipartUploadRequest.Builder contentType(String contentType)
      The MIME type of the data you are uploading.
      Parameters:
      contentType - The Content-Type
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • metadata

      @BetaApi public CreateMultipartUploadRequest.Builder metadata(Map<String,String> metadata)
      The custom metadata of the object.
      Parameters:
      metadata - The custom metadata
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • storageClass

      @BetaApi public CreateMultipartUploadRequest.Builder storageClass(StorageClass storageClass)
      Gives each part of the upload and the resulting object a storage class besides the default storage class of the associated bucket.
      Parameters:
      storageClass - The Storage-Class
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • customTime

      @BetaApi public CreateMultipartUploadRequest.Builder customTime(OffsetDateTime customTime)
      A user-specified date and time.
      Parameters:
      customTime - The custom time
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • kmsKeyName

      @BetaApi public CreateMultipartUploadRequest.Builder kmsKeyName(String kmsKeyName)
      The customer-managed encryption key to use to encrypt the object. Refer: Customer Managed Keys
      Parameters:
      kmsKeyName - The Cloud KMS key
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • objectLockMode

      @BetaApi public CreateMultipartUploadRequest.Builder objectLockMode(ObjectLockMode objectLockMode)
      Mode of the object's retention configuration. GOVERNANCE corresponds to unlocked mode, and COMPLIANCE corresponds to locked mode.
      Parameters:
      objectLockMode - The object lock mode
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • objectLockRetainUntilDate

      @BetaApi public CreateMultipartUploadRequest.Builder objectLockRetainUntilDate(OffsetDateTime objectLockRetainUntilDate)
      Date that determines the time until which the object is retained as immutable.
      Parameters:
      objectLockRetainUntilDate - The object lock retention until date
      Returns:
      this builder
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.
    • build

      @BetaApi public CreateMultipartUploadRequest build()
      Creates a new CreateMultipartUploadRequest object.
      Returns:
      a new CreateMultipartUploadRequest object
      Since:
      2.60.0 This new api is in preview and is subject to breaking changes.