Class CreateMultipartUploadRequest.Builder
java.lang.Object
com.google.cloud.storage.multipartupload.model.CreateMultipartUploadRequest.Builder
- Enclosing class:
- CreateMultipartUploadRequest
A builder for
CreateMultipartUploadRequest.- Since:
- 2.60.0 This new api is in preview and is subject to breaking changes.
-
Method Summary
Modifier and TypeMethodDescriptionThe bucket to which the object is being uploaded.build()Creates a newCreateMultipartUploadRequestobject.cannedAcl(Storage.PredefinedAcl cannedAcl) A canned ACL to apply to the object.contentType(String contentType) The MIME type of the data you are uploading.customTime(OffsetDateTime customTime) A user-specified date and time.The name of the object.kmsKeyName(String kmsKeyName) The customer-managed encryption key to use to encrypt the object.The custom metadata of the object.objectLockMode(ObjectLockMode objectLockMode) Mode of the object's retention configuration.objectLockRetainUntilDate(OffsetDateTime objectLockRetainUntilDate) Date that determines the time until which the object is retained as immutable.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.
-
Method Details
-
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
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
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
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
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
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
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
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
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
Creates a newCreateMultipartUploadRequestobject.- Returns:
- a new
CreateMultipartUploadRequestobject - Since:
- 2.60.0 This new api is in preview and is subject to breaking changes.
-