StorageMetadata.Builder

public 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 constructors

Builder

public Builder()

Creates an empty set of metadata.

Builder

public Builder(@NonNullStorageMetadata original)

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

Parameters
@NonNullStorageMetadata original

The source of the metadata to build from.

Public methods

build

public @NonNullStorageMetadata build()

getCacheControl

public @NullableString getCacheControl()
Returns
@NullableString

the Cache Control header for the StorageReference

getContentDisposition

public @NullableString getContentDisposition()
Returns
@NullableString

the content disposition for the StorageReference

getContentEncoding

public @NullableString getContentEncoding()
Returns
@NullableString

the content encoding for the StorageReference

getContentLanguage

public @NullableString getContentLanguage()
Returns
@NullableString

the content language for the StorageReference

getContentType

public @NullableString getContentType()
Returns
@NullableString

the Content Type of this associated StorageReference

setCacheControl

public @NonNullStorageMetadata.Builder setCacheControl(@NullableString cacheControl)

Sets the Cache Control header for the StorageReference

Parameters
@NullableString cacheControl

the new Cache Control setting.

setContentDisposition

public @NonNullStorageMetadata.Builder setContentDisposition(@NullableString contentDisposition)

Changes the content disposition for the StorageReference

Parameters
@NullableString contentDisposition

the new content disposition to use.

setContentEncoding

public @NonNullStorageMetadata.Builder setContentEncoding(@NullableString contentEncoding)

Changes the content encoding for the StorageReference

Parameters
@NullableString contentEncoding

the new encoding to use.

setContentLanguage

public @NonNullStorageMetadata.Builder setContentLanguage(@NullableString contentLanguage)

Changes the content language for the StorageReference

Parameters
@NullableString contentLanguage

the new content language.

setContentType

public @NonNullStorageMetadata.Builder setContentType(@NullableString contentType)

Changes the content Type of this associated StorageReference

Parameters
@NullableString contentType

the new Content Type.

setCustomMetadata

public @NonNullStorageMetadata.Builder setCustomMetadata(@NonNullString key, @NullableString value)

Sets custom metadata

Parameters
@NonNullString key

the key of the new value

@NullableString value

the value to set.