StorageMetadata.Builder

class StorageMetadata.Builder


Creates a StorageMetadata object.

Summary

Public constructors

Creates an empty set of metadata.

Used to create a modified version of the original set of metadata.

Public functions

StorageMetadata
String?
String?
String?
String?
String?
StorageMetadata.Builder
setCacheControl(cacheControl: String?)

Sets the Cache Control header for the StorageReference

StorageMetadata.Builder
setContentDisposition(contentDisposition: String?)

Changes the content disposition for the StorageReference

StorageMetadata.Builder
setContentEncoding(contentEncoding: String?)

Changes the content encoding for the StorageReference

StorageMetadata.Builder
setContentLanguage(contentLanguage: String?)

Changes the content language for the StorageReference

StorageMetadata.Builder
setContentType(contentType: String?)

Changes the content Type of this associated StorageReference

StorageMetadata.Builder
setCustomMetadata(key: String, value: String?)

Sets custom metadata

Public constructors

Builder

Builder()

Creates an empty set of metadata.

Builder

Builder(original: StorageMetadata)

Used to create a modified version of the original set of metadata.

Parameters
original: StorageMetadata

The source of the metadata to build from.

Public functions

build

fun build(): StorageMetadata

getCacheControl

fun getCacheControl(): String?
Returns
String?

the Cache Control header for the StorageReference

getContentDisposition

fun getContentDisposition(): String?
Returns
String?

the content disposition for 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 this associated StorageReference

setCacheControl

fun setCacheControl(cacheControl: String?): StorageMetadata.Builder

Sets the Cache Control header for the StorageReference

Parameters
cacheControl: String?

the new Cache Control setting.

setContentDisposition

fun setContentDisposition(contentDisposition: String?): StorageMetadata.Builder

Changes the content disposition for the StorageReference

Parameters
contentDisposition: String?

the new content disposition to use.

setContentEncoding

fun setContentEncoding(contentEncoding: String?): StorageMetadata.Builder

Changes the content encoding for the StorageReference

Parameters
contentEncoding: String?

the new encoding to use.

setContentLanguage

fun setContentLanguage(contentLanguage: String?): StorageMetadata.Builder

Changes the content language for the StorageReference

Parameters
contentLanguage: String?

the new content language.

setContentType

fun setContentType(contentType: String?): StorageMetadata.Builder

Changes the content Type of this associated StorageReference

Parameters
contentType: String?

the new Content Type.

setCustomMetadata

fun setCustomMetadata(key: String, value: String?): StorageMetadata.Builder

Sets custom metadata

Parameters
key: String

the key of the new value

value: String?

the value to set.