Package com.google.cloud.storage
Class Bucket.BlobWriteOption
java.lang.Object
com.google.cloud.storage.Option<com.google.cloud.storage.UnifiedOpts.ObjectTargetOpt>
com.google.cloud.storage.Bucket.BlobWriteOption
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Bucket
public static class Bucket.BlobWriteOption
extends Option<com.google.cloud.storage.UnifiedOpts.ObjectTargetOpt>
implements Serializable
Class for specifying blob write options when
Bucket
methods are used.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Bucket.BlobWriteOption
crc32cMatch
(@NonNull String crc32c) Returns an option for blob's data CRC32C checksum match.static Bucket.BlobWriteOption[]
dedupe
(Bucket.BlobWriteOption... os) Deduplicate any options which are the same parameter.static Bucket.BlobWriteOption[]
dedupe
(Bucket.BlobWriteOption[] array, Bucket.BlobWriteOption... os) Deduplicate any options which are the same parameter.static Bucket.BlobWriteOption[]
dedupe
(Collection<Bucket.BlobWriteOption> collection, Bucket.BlobWriteOption... os) Deduplicate any options which are the same parameter.static Bucket.BlobWriteOption
Returns an option that causes an operation to succeed only if the target blob does not exist.static Bucket.BlobWriteOption
encryptionKey
(@NonNull String key) Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.static Bucket.BlobWriteOption
encryptionKey
(@NonNull Key key) Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.boolean
Deprecated.static Bucket.BlobWriteOption
generationMatch
(long generation) Returns an option for blob's data generation match.static Bucket.BlobWriteOption
generationNotMatch
(long generation) Returns an option for blob's data generation mismatch.int
hashCode()
Deprecated.static Bucket.BlobWriteOption
Returns an option for blob's data MD5 hash match.static Bucket.BlobWriteOption
metagenerationMatch
(long metageneration) Returns an option for blob's metageneration match.static Bucket.BlobWriteOption
metagenerationNotMatch
(long metageneration) Returns an option for blob's metageneration mismatch.static Bucket.BlobWriteOption
predefinedAcl
(@NonNull Storage.PredefinedAcl acl) Returns an option for specifying blob's predefined ACL configuration.toString()
Deprecated.static Bucket.BlobWriteOption
userProject
(@NonNull String userProject) Returns an option for blob's billing user project.
-
Method Details
-
predefinedAcl
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption predefinedAcl(@NonNull Storage.PredefinedAcl acl) Returns an option for specifying blob's predefined ACL configuration. -
doesNotExist
Returns an option that causes an operation to succeed only if the target blob does not exist. This option can not be provided together withgenerationMatch(long)
orgenerationNotMatch(long)
. -
generationMatch
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption generationMatch(long generation) Returns an option for blob's data generation match. If this option is used the request will fail if generation does not match the provided value. This option can not be provided together withgenerationNotMatch(long)
ordoesNotExist()
. -
generationNotMatch
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption generationNotMatch(long generation) Returns an option for blob's data generation mismatch. If this option is used the request will fail if generation matches the provided value. This option can not be provided together withgenerationMatch(long)
ordoesNotExist()
. -
metagenerationMatch
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption metagenerationMatch(long metageneration) Returns an option for blob's metageneration match. If this option is used the request will fail if metageneration does not match the provided value. This option can not be provided together withmetagenerationNotMatch(long)
. -
metagenerationNotMatch
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption metagenerationNotMatch(long metageneration) Returns an option for blob's metageneration mismatch. If this option is used the request will fail if metageneration matches the provided value. This option can not be provided together withmetagenerationMatch(long)
. -
md5Match
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption md5Match(@NonNull String md5) Returns an option for blob's data MD5 hash match. If this option is used the request will fail if blobs' data MD5 hash does not match the provided value. -
crc32cMatch
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption crc32cMatch(@NonNull String crc32c) Returns an option for blob's data CRC32C checksum match. If this option is used the request will fail if blobs' data CRC32C checksum does not match the provided value. -
encryptionKey
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption encryptionKey(@NonNull Key key) Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob. -
encryptionKey
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption encryptionKey(@NonNull String key) Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.- Parameters:
key
- the AES256 encoded in base64
-
userProject
@TransportCompatibility({HTTP,GRPC}) public static Bucket.BlobWriteOption userProject(@NonNull String userProject) Returns an option for blob's billing user project. This option is only used by the buckets with 'requester_pays' flag. -
dedupe
Deduplicate any options which are the same parameter. The value which comes last inos
will be the value included in the return. -
dedupe
@BetaApi public static Bucket.BlobWriteOption[] dedupe(Collection<Bucket.BlobWriteOption> collection, Bucket.BlobWriteOption... os) Deduplicate any options which are the same parameter.The value which comes last in
collection
andos
will be the value included in the return. All options fromos
will override their counterparts incollection
. -
dedupe
@BetaApi public static Bucket.BlobWriteOption[] dedupe(Bucket.BlobWriteOption[] array, Bucket.BlobWriteOption... os) Deduplicate any options which are the same parameter.The value which comes last in
collection
andos
will be the value included in the return. All options fromos
will override their counterparts incollection
. -
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated.
-