StorageMetadata

class StorageMetadata


Metadata for a StorageReference. Metadata stores default attributes such as size and content type. You may also store custom metadata key value pairs. Metadata values may be used to authorize operations using declarative validation rules.

Summary

Nested types

Creates a StorageMetadata object.

Public constructors

Creates a StorageMetadata object to hold metadata for a StorageReference

Public constructors

StorageMetadata

StorageMetadata()

Creates a StorageMetadata object to hold metadata for a StorageReference

Public functions

getBucket

fun getBucket(): String?
Returns
String?

the owning Google Cloud Storage bucket for the StorageReference

getCacheControl

fun getCacheControl(): String?
Returns
String?

the Cache Control setting of the StorageReference

getContentDisposition

fun getContentDisposition(): String?
Returns
String?

the content disposition of the StorageReference

getContentEncoding

fun getContentEncoding(): String?
Returns
String?

the content encoding for the StorageReference

getContentLanguage

fun getContentLanguage(): String?
Returns
String?

the content language for the StorageReference

getContentType

fun getContentType(): String?
Returns
String?

the content type of the StorageReference.

getCreationTimeMillis

fun getCreationTimeMillis(): Long
Returns
Long

the time the StorageReference was created.

getCustomMetadata

fun getCustomMetadata(key: String): String?

Returns custom metadata for a StorageReference

Parameters
key: String

The key for which the metadata should be returned

Returns
String?

the metadata stored in the object the given key.

getCustomMetadataKeys

fun getCustomMetadataKeys(): (Mutable)Set<String!>
Returns
(Mutable)Set<String!>

the keys for custom metadata.

getGeneration

fun getGeneration(): String?
Returns
String?

a version String indicating what version of the StorageReference

getMd5Hash

fun getMd5Hash(): String?
Returns
String?

the MD5Hash of the StorageReference object

getMetadataGeneration

fun getMetadataGeneration(): String?
Returns
String?

a version String indicating the version of this StorageMetadata

getName

fun getName(): String?
Returns
String?

a simple name of the StorageReference object

getPath

fun getPath(): String
Returns
String

the path of the StorageReference object

getReference

fun getReference(): StorageReference?
Returns
StorageReference?

the associated StorageReference for which this metadata belongs to.

getSizeBytes

fun getSizeBytes(): Long
Returns
Long

the stored Size in bytes of the StorageReference object

getUpdatedTimeMillis

fun getUpdatedTimeMillis(): Long
Returns
Long

the time the StorageReference was last updated.