Class StorageObjectData (0.15.0)

public final class StorageObjectData extends GeneratedMessageV3 implements StorageObjectDataOrBuilder

An object within Google Cloud Storage.

Protobuf type google.events.cloud.storage.v1.StorageObjectData

Static Fields

BUCKET_FIELD_NUMBER

public static final int BUCKET_FIELD_NUMBER
Field Value
Type Description
int

CACHE_CONTROL_FIELD_NUMBER

public static final int CACHE_CONTROL_FIELD_NUMBER
Field Value
Type Description
int

COMPONENT_COUNT_FIELD_NUMBER

public static final int COMPONENT_COUNT_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_DISPOSITION_FIELD_NUMBER

public static final int CONTENT_DISPOSITION_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_ENCODING_FIELD_NUMBER

public static final int CONTENT_ENCODING_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_LANGUAGE_FIELD_NUMBER

public static final int CONTENT_LANGUAGE_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_TYPE_FIELD_NUMBER

public static final int CONTENT_TYPE_FIELD_NUMBER
Field Value
Type Description
int

CRC32C_FIELD_NUMBER

public static final int CRC32C_FIELD_NUMBER
Field Value
Type Description
int

CUSTOMER_ENCRYPTION_FIELD_NUMBER

public static final int CUSTOMER_ENCRYPTION_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

EVENT_BASED_HOLD_FIELD_NUMBER

public static final int EVENT_BASED_HOLD_FIELD_NUMBER
Field Value
Type Description
int

GENERATION_FIELD_NUMBER

public static final int GENERATION_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

KMS_KEY_NAME_FIELD_NUMBER

public static final int KMS_KEY_NAME_FIELD_NUMBER
Field Value
Type Description
int

MD5_HASH_FIELD_NUMBER

public static final int MD5_HASH_FIELD_NUMBER
Field Value
Type Description
int
public static final int MEDIA_LINK_FIELD_NUMBER
Field Value
Type Description
int

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
Type Description
int

METAGENERATION_FIELD_NUMBER

public static final int METAGENERATION_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

RETENTION_EXPIRATION_TIME_FIELD_NUMBER

public static final int RETENTION_EXPIRATION_TIME_FIELD_NUMBER
Field Value
Type Description
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
Type Description
int

SIZE_FIELD_NUMBER

public static final int SIZE_FIELD_NUMBER
Field Value
Type Description
int

STORAGE_CLASS_FIELD_NUMBER

public static final int STORAGE_CLASS_FIELD_NUMBER
Field Value
Type Description
int

TEMPORARY_HOLD_FIELD_NUMBER

public static final int TEMPORARY_HOLD_FIELD_NUMBER
Field Value
Type Description
int

TIME_CREATED_FIELD_NUMBER

public static final int TIME_CREATED_FIELD_NUMBER
Field Value
Type Description
int

TIME_DELETED_FIELD_NUMBER

public static final int TIME_DELETED_FIELD_NUMBER
Field Value
Type Description
int

TIME_STORAGE_CLASS_UPDATED_FIELD_NUMBER

public static final int TIME_STORAGE_CLASS_UPDATED_FIELD_NUMBER
Field Value
Type Description
int

UPDATED_FIELD_NUMBER

public static final int UPDATED_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static StorageObjectData getDefaultInstance()
Returns
Type Description
StorageObjectData

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static StorageObjectData.Builder newBuilder()
Returns
Type Description
StorageObjectData.Builder

newBuilder(StorageObjectData prototype)

public static StorageObjectData.Builder newBuilder(StorageObjectData prototype)
Parameter
Name Description
prototype StorageObjectData
Returns
Type Description
StorageObjectData.Builder

parseDelimitedFrom(InputStream input)

public static StorageObjectData parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StorageObjectData
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StorageObjectData parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StorageObjectData
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static StorageObjectData parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
StorageObjectData
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StorageObjectData parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StorageObjectData
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StorageObjectData parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
StorageObjectData
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StorageObjectData parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StorageObjectData
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StorageObjectData parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
StorageObjectData
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StorageObjectData parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StorageObjectData
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static StorageObjectData parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StorageObjectData
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StorageObjectData parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StorageObjectData
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static StorageObjectData parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
StorageObjectData
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StorageObjectData parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StorageObjectData
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<StorageObjectData> parser()
Returns
Type Description
Parser<StorageObjectData>

Methods

containsMetadata(String key)

public boolean containsMetadata(String key)

User-provided metadata, in key/value pairs.

map<string, string> metadata = 21;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBucket()

public String getBucket()

The name of the bucket containing this object.

string bucket = 25;

Returns
Type Description
String

The bucket.

getBucketBytes()

public ByteString getBucketBytes()

The name of the bucket containing this object.

string bucket = 25;

Returns
Type Description
ByteString

The bytes for bucket.

getCacheControl()

public String getCacheControl()

Cache-Control directive for the object data, matching https://tools.ietf.org/html/rfc7234#section-5.2".

string cache_control = 3;

Returns
Type Description
String

The cacheControl.

getCacheControlBytes()

public ByteString getCacheControlBytes()

Cache-Control directive for the object data, matching https://tools.ietf.org/html/rfc7234#section-5.2".

string cache_control = 3;

Returns
Type Description
ByteString

The bytes for cacheControl.

getComponentCount()

public int getComponentCount()

Number of underlying components that make up this object. Components are accumulated by compose operations. Attempting to set this field will result in an error.

int32 component_count = 12;

Returns
Type Description
int

The componentCount.

getContentDisposition()

public String getContentDisposition()

Content-Disposition of the object data, matching https://tools.ietf.org/html/rfc6266.

string content_disposition = 2;

Returns
Type Description
String

The contentDisposition.

getContentDispositionBytes()

public ByteString getContentDispositionBytes()

Content-Disposition of the object data, matching https://tools.ietf.org/html/rfc6266.

string content_disposition = 2;

Returns
Type Description
ByteString

The bytes for contentDisposition.

getContentEncoding()

public String getContentEncoding()

Content-Encoding of the object data, matching https://tools.ietf.org/html/rfc7231#section-3.1.2.2

string content_encoding = 1;

Returns
Type Description
String

The contentEncoding.

getContentEncodingBytes()

public ByteString getContentEncodingBytes()

Content-Encoding of the object data, matching https://tools.ietf.org/html/rfc7231#section-3.1.2.2

string content_encoding = 1;

Returns
Type Description
ByteString

The bytes for contentEncoding.

getContentLanguage()

public String getContentLanguage()

Content-Language of the object data, matching https://tools.ietf.org/html/rfc7231#section-3.1.3.2.

string content_language = 5;

Returns
Type Description
String

The contentLanguage.

getContentLanguageBytes()

public ByteString getContentLanguageBytes()

Content-Language of the object data, matching https://tools.ietf.org/html/rfc7231#section-3.1.3.2.

string content_language = 5;

Returns
Type Description
ByteString

The bytes for contentLanguage.

getContentType()

public String getContentType()

Content-Type of the object data, matching https://tools.ietf.org/html/rfc7231#section-3.1.1.5. If an object is stored without a Content-Type, it is served as application/octet-stream.

string content_type = 8;

Returns
Type Description
String

The contentType.

getContentTypeBytes()

public ByteString getContentTypeBytes()

Content-Type of the object data, matching https://tools.ietf.org/html/rfc7231#section-3.1.1.5. If an object is stored without a Content-Type, it is served as application/octet-stream.

string content_type = 8;

Returns
Type Description
ByteString

The bytes for contentType.

getCrc32C()

public String getCrc32C()

CRC32c checksum. For more information about using the CRC32c checksum, see https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI.

string crc32c = 11;

Returns
Type Description
String

The crc32c.

getCrc32CBytes()

public ByteString getCrc32CBytes()

CRC32c checksum. For more information about using the CRC32c checksum, see https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI.

string crc32c = 11;

Returns
Type Description
ByteString

The bytes for crc32c.

getCustomerEncryption()

public StorageObjectData.CustomerEncryption getCustomerEncryption()

Metadata of customer-supplied encryption key, if the object is encrypted by such a key.

.google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28;

Returns
Type Description
StorageObjectData.CustomerEncryption

The customerEncryption.

getCustomerEncryptionOrBuilder()

public StorageObjectData.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder()

Metadata of customer-supplied encryption key, if the object is encrypted by such a key.

.google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28;

Returns
Type Description
StorageObjectData.CustomerEncryptionOrBuilder

getDefaultInstanceForType()

public StorageObjectData getDefaultInstanceForType()
Returns
Type Description
StorageObjectData

getEtag()

public String getEtag()

HTTP 1.1 Entity tag for the object. See https://tools.ietf.org/html/rfc7232#section-2.3.

string etag = 14;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

HTTP 1.1 Entity tag for the object. See https://tools.ietf.org/html/rfc7232#section-2.3.

string etag = 14;

Returns
Type Description
ByteString

The bytes for etag.

getEventBasedHold()

public boolean getEventBasedHold()

Whether an object is under event-based hold.

bool event_based_hold = 29;

Returns
Type Description
boolean

The eventBasedHold.

getGeneration()

public long getGeneration()

The content generation of this object. Used for object versioning. Attempting to set this field will result in an error.

int64 generation = 26;

Returns
Type Description
long

The generation.

getId()

public String getId()

The ID of the object, including the bucket name, object name, and generation number.

string id = 24;

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

The ID of the object, including the bucket name, object name, and generation number.

string id = 24;

Returns
Type Description
ByteString

The bytes for id.

getKind()

public String getKind()

The kind of item this is. For objects, this is always "storage#object".

string kind = 102;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

The kind of item this is. For objects, this is always "storage#object".

string kind = 102;

Returns
Type Description
ByteString

The bytes for kind.

getKmsKeyName()

public String getKmsKeyName()

Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key.

string kms_key_name = 17;

Returns
Type Description
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key.

string kms_key_name = 17;

Returns
Type Description
ByteString

The bytes for kmsKeyName.

getMd5Hash()

public String getMd5Hash()

MD5 hash of the data; encoded using base64 as per https://tools.ietf.org/html/rfc4648#section-4. For more information about using the MD5 hash, see https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI.

string md5_hash = 13;

Returns
Type Description
String

The md5Hash.

getMd5HashBytes()

public ByteString getMd5HashBytes()

MD5 hash of the data; encoded using base64 as per https://tools.ietf.org/html/rfc4648#section-4. For more information about using the MD5 hash, see https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI.

string md5_hash = 13;

Returns
Type Description
ByteString

The bytes for md5Hash.

public String getMediaLink()

Media download link.

string media_link = 100;

Returns
Type Description
String

The mediaLink.

getMediaLinkBytes()

public ByteString getMediaLinkBytes()

Media download link.

string media_link = 100;

Returns
Type Description
ByteString

The bytes for mediaLink.

getMetadata()

public Map<String,String> getMetadata()

Use #getMetadataMap() instead.

Returns
Type Description
Map<String,String>

getMetadataCount()

public int getMetadataCount()

User-provided metadata, in key/value pairs.

map<string, string> metadata = 21;

Returns
Type Description
int

getMetadataMap()

public Map<String,String> getMetadataMap()

User-provided metadata, in key/value pairs.

map<string, string> metadata = 21;

Returns
Type Description
Map<String,String>

getMetadataOrDefault(String key, String defaultValue)

public String getMetadataOrDefault(String key, String defaultValue)

User-provided metadata, in key/value pairs.

map<string, string> metadata = 21;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getMetadataOrThrow(String key)

public String getMetadataOrThrow(String key)

User-provided metadata, in key/value pairs.

map<string, string> metadata = 21;

Parameter
Name Description
key String
Returns
Type Description
String

getMetageneration()

public long getMetageneration()

The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.

int64 metageneration = 6;

Returns
Type Description
long

The metageneration.

getName()

public String getName()

The name of the object.

string name = 23;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the object.

string name = 23;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<StorageObjectData> getParserForType()
Returns
Type Description
Parser<StorageObjectData>
Overrides

getRetentionExpirationTime()

public Timestamp getRetentionExpirationTime()

A server-determined value that specifies the earliest time that the object's retention period expires.

.google.protobuf.Timestamp retention_expiration_time = 20;

Returns
Type Description
Timestamp

The retentionExpirationTime.

getRetentionExpirationTimeOrBuilder()

public TimestampOrBuilder getRetentionExpirationTimeOrBuilder()

A server-determined value that specifies the earliest time that the object's retention period expires.

.google.protobuf.Timestamp retention_expiration_time = 20;

Returns
Type Description
TimestampOrBuilder
public String getSelfLink()

The link to this object.

string self_link = 101;

Returns
Type Description
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

The link to this object.

string self_link = 101;

Returns
Type Description
ByteString

The bytes for selfLink.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSize()

public long getSize()

Content-Length of the object data in bytes, matching https://tools.ietf.org/html/rfc7230#section-3.3.2.

int64 size = 9;

Returns
Type Description
long

The size.

getStorageClass()

public String getStorageClass()

Storage class of the object.

string storage_class = 16;

Returns
Type Description
String

The storageClass.

getStorageClassBytes()

public ByteString getStorageClassBytes()

Storage class of the object.

string storage_class = 16;

Returns
Type Description
ByteString

The bytes for storageClass.

getTemporaryHold()

public boolean getTemporaryHold()

Whether an object is under temporary hold.

bool temporary_hold = 19;

Returns
Type Description
boolean

The temporaryHold.

getTimeCreated()

public Timestamp getTimeCreated()

The creation time of the object. Attempting to set this field will result in an error.

.google.protobuf.Timestamp time_created = 10;

Returns
Type Description
Timestamp

The timeCreated.

getTimeCreatedOrBuilder()

public TimestampOrBuilder getTimeCreatedOrBuilder()

The creation time of the object. Attempting to set this field will result in an error.

.google.protobuf.Timestamp time_created = 10;

Returns
Type Description
TimestampOrBuilder

getTimeDeleted()

public Timestamp getTimeDeleted()

The deletion time of the object. Will be returned if and only if this version of the object has been deleted.

.google.protobuf.Timestamp time_deleted = 7;

Returns
Type Description
Timestamp

The timeDeleted.

getTimeDeletedOrBuilder()

public TimestampOrBuilder getTimeDeletedOrBuilder()

The deletion time of the object. Will be returned if and only if this version of the object has been deleted.

.google.protobuf.Timestamp time_deleted = 7;

Returns
Type Description
TimestampOrBuilder

getTimeStorageClassUpdated()

public Timestamp getTimeStorageClassUpdated()

The time at which the object's storage class was last changed.

.google.protobuf.Timestamp time_storage_class_updated = 18;

Returns
Type Description
Timestamp

The timeStorageClassUpdated.

getTimeStorageClassUpdatedOrBuilder()

public TimestampOrBuilder getTimeStorageClassUpdatedOrBuilder()

The time at which the object's storage class was last changed.

.google.protobuf.Timestamp time_storage_class_updated = 18;

Returns
Type Description
TimestampOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

getUpdated()

public Timestamp getUpdated()

The modification time of the object metadata.

.google.protobuf.Timestamp updated = 15;

Returns
Type Description
Timestamp

The updated.

getUpdatedOrBuilder()

public TimestampOrBuilder getUpdatedOrBuilder()

The modification time of the object metadata.

.google.protobuf.Timestamp updated = 15;

Returns
Type Description
TimestampOrBuilder

hasCustomerEncryption()

public boolean hasCustomerEncryption()

Metadata of customer-supplied encryption key, if the object is encrypted by such a key.

.google.events.cloud.storage.v1.StorageObjectData.CustomerEncryption customer_encryption = 28;

Returns
Type Description
boolean

Whether the customerEncryption field is set.

hasRetentionExpirationTime()

public boolean hasRetentionExpirationTime()

A server-determined value that specifies the earliest time that the object's retention period expires.

.google.protobuf.Timestamp retention_expiration_time = 20;

Returns
Type Description
boolean

Whether the retentionExpirationTime field is set.

hasTimeCreated()

public boolean hasTimeCreated()

The creation time of the object. Attempting to set this field will result in an error.

.google.protobuf.Timestamp time_created = 10;

Returns
Type Description
boolean

Whether the timeCreated field is set.

hasTimeDeleted()

public boolean hasTimeDeleted()

The deletion time of the object. Will be returned if and only if this version of the object has been deleted.

.google.protobuf.Timestamp time_deleted = 7;

Returns
Type Description
boolean

Whether the timeDeleted field is set.

hasTimeStorageClassUpdated()

public boolean hasTimeStorageClassUpdated()

The time at which the object's storage class was last changed.

.google.protobuf.Timestamp time_storage_class_updated = 18;

Returns
Type Description
boolean

Whether the timeStorageClassUpdated field is set.

hasUpdated()

public boolean hasUpdated()

The modification time of the object metadata.

.google.protobuf.Timestamp updated = 15;

Returns
Type Description
boolean

Whether the updated field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public StorageObjectData.Builder newBuilderForType()
Returns
Type Description
StorageObjectData.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StorageObjectData.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
StorageObjectData.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public StorageObjectData.Builder toBuilder()
Returns
Type Description
StorageObjectData.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException