Package com.google.cloud.storage
Class Blob.BlobSourceOption
java.lang.Object
com.google.cloud.storage.Option<com.google.cloud.storage.UnifiedOpts.ObjectSourceOpt>
com.google.cloud.storage.Blob.BlobSourceOption
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Blob
public static class Blob.BlobSourceOption
extends Option<com.google.cloud.storage.UnifiedOpts.ObjectSourceOpt>
Class for specifying blob source options when
Blob methods are used.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Blob.BlobSourceOptiondecryptionKey(@NonNull String key) Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.static Blob.BlobSourceOptiondecryptionKey(@NonNull Key key) Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob.static Blob.BlobSourceOption[]dedupe(Blob.BlobSourceOption... os) Deduplicate any options which are the same parameter.static Blob.BlobSourceOption[]dedupe(Blob.BlobSourceOption[] array, Blob.BlobSourceOption... os) Deduplicate any options which are the same parameter.static Blob.BlobSourceOption[]dedupe(Collection<Blob.BlobSourceOption> collection, Blob.BlobSourceOption... os) Deduplicate any options which are the same parameter.booleanDeprecated.static Blob.BlobSourceOptionReturns an option for blob's generation match.static Blob.BlobSourceOptionDeprecated.This option is invalid, and can never result in a valid response from the server.inthashCode()Deprecated.static Blob.BlobSourceOptionReturns an option for blob's metageneration match.static Blob.BlobSourceOptionReturns an option for blob's metageneration mismatch.static Blob.BlobSourceOptionshouldReturnRawInputStream(boolean shouldReturnRawInputStream) Returns an option for whether the request should return the raw input stream, instead of automatically decompressing the content.toString()Deprecated.static Blob.BlobSourceOptionuserProject(@NonNull String userProject) Returns an option for blob's billing user project.
-
Method Details
-
generationMatch
Returns an option for blob's generation match. If this option is used the request will fail if generation does not match. -
generationNotMatch
@Deprecated @TransportCompatibility({HTTP,GRPC}) public static Blob.BlobSourceOption generationNotMatch()Deprecated.This option is invalid, and can never result in a valid response from the server.Returns an option for blob's generation mismatch. If this option is used the request will fail if generation matches. -
metagenerationMatch
Returns an option for blob's metageneration match. If this option is used the request will fail if metageneration does not match. -
metagenerationNotMatch
Returns an option for blob's metageneration mismatch. If this option is used the request will fail if metageneration matches. -
decryptionKey
@TransportCompatibility({HTTP,GRPC}) public static Blob.BlobSourceOption decryptionKey(@NonNull Key key) Returns an option to set a customer-supplied AES256 key for server-side encryption of the blob. -
decryptionKey
@TransportCompatibility({HTTP,GRPC}) public static Blob.BlobSourceOption decryptionKey(@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 Blob.BlobSourceOption userProject(@NonNull String userProject) Returns an option for blob's billing user project. This option is used only if the blob's bucket has requester_pays flag enabled. -
shouldReturnRawInputStream
@TransportCompatibility({HTTP,GRPC}) public static Blob.BlobSourceOption shouldReturnRawInputStream(boolean shouldReturnRawInputStream) Returns an option for whether the request should return the raw input stream, instead of automatically decompressing the content. By default, this is false for Blob.downloadTo(), but true for ReadChannel.read(). -
dedupe
Deduplicate any options which are the same parameter. The value which comes last inoswill be the value included in the return. -
dedupe
public static Blob.BlobSourceOption[] dedupe(Collection<Blob.BlobSourceOption> collection, Blob.BlobSourceOption... os) Deduplicate any options which are the same parameter.The value which comes last in
collectionandoswill be the value included in the return. All options fromoswill override their counterparts incollection. -
dedupe
public static Blob.BlobSourceOption[] dedupe(Blob.BlobSourceOption[] array, Blob.BlobSourceOption... os) Deduplicate any options which are the same parameter.The value which comes last in
collectionandoswill be the value included in the return. All options fromoswill override their counterparts incollection. -
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated.
-