firebase::storage::Metadata

#include <metadata.h>

Metadata stores default attributes such as size and content type.

Summary

Metadata for a StorageReference. You may also store custom metadata key value pairs. Metadata values may be used to authorize operations using declarative validation rules.

Constructors and Destructors

Metadata()
Create a default Metadata that you can modify and use.
Metadata(const Metadata & other)
Copy constructor.
Metadata(Metadata && other)
Move constructor.
~Metadata()

Public functions

GetReference() const
Return the associated StorageReference to which this Metadata belongs.
bucket() const
const char *
Return the owning Google Cloud Storage bucket for the StorageReference.
cache_control() const
const char *
Return the Cache Control setting of the StorageReference.
content_disposition() const
const char *
Return the content disposition of the StorageReference.
content_encoding() const
const char *
Return the content encoding for the StorageReference.
content_language() const
const char *
Return the content language for the StorageReference.
content_type() const
const char *
Return the content type of the StorageReference.
creation_time() const
int64_t
Return the time the StorageReference was created in milliseconds since the epoch.
custom_metadata() const
std::map< std::string, std::string > *
Return a map of custom metadata key value pairs.
generation() const
int64_t
Return a version String indicating what version of the StorageReference.
is_valid() const
bool
Returns true if this Metadata is valid, false if it is not valid.
md5_hash() const
const char *
MD5 hash of the data; encoded using base64.
metadata_generation() const
int64_t
Return a version String indicating the version of this StorageMetadata.
name() const
const char *
Return a simple name of the StorageReference object.
operator=(const Metadata & other)
Copy assignment operator.
operator=(Metadata && other)
Move assignment operator.
path() const
const char *
Return the path of the StorageReference object.
set_cache_control(const char *cache_control)
void
Set the Cache Control setting of the StorageReference.
set_cache_control(const std::string & cache_control)
void
Set the Cache Control setting of the StorageReference.
set_content_disposition(const char *disposition)
void
Set the content disposition of the StorageReference.
set_content_disposition(const std::string & disposition)
void
Set the content disposition of the StorageReference.
set_content_encoding(const char *encoding)
void
Set the content encoding for the StorageReference.
set_content_encoding(const std::string & encoding)
void
Set the content encoding for the StorageReference.
set_content_language(const char *language)
void
Set the content language for the StorageReference.
set_content_language(const std::string & language)
void
Set the content language for the StorageReference.
set_content_type(const char *type)
void
Set the content type of the StorageReference.
set_content_type(const std::string & type)
void
Set the content type of the StorageReference.
size_bytes() const
int64_t
Return the stored Size in bytes of the StorageReference object.
updated_time() const
int64_t
Return the time the StorageReference was last updated in milliseconds since the epoch.

Public functions

GetReference

StorageReference GetReference() const 

Return the associated StorageReference to which this Metadata belongs.

Details
Returns
The associated StorageReference to which this Metadata belongs. If this Metadata is invalid or is not associated with any file, an invalid StorageReference is returned.

Metadata

 Metadata()

Create a default Metadata that you can modify and use.

Metadata

 Metadata(
  const Metadata & other
)

Copy constructor.

Details
Parameters
other
Metadata to copy from.

Metadata

 Metadata(
  Metadata && other
)

Move constructor.

Moving is an efficient operation for Metadata.

Details
Parameters
other
Metadata to move from.

bucket

const char * bucket() const 

Return the owning Google Cloud Storage bucket for the StorageReference.

Details
Returns
The owning Google Cloud Storage bucket for the StorageReference.

cache_control

const char * cache_control() const 

Return the Cache Control setting of the StorageReference.

See also: https://tools.ietf.org/html/rfc7234#section-5.2

Details
Returns
The Cache Control setting of the StorageReference.

content_disposition

const char * content_disposition() const 

Return the content disposition of the StorageReference.

See also: https://tools.ietf.org/html/rfc6266

Details
Returns
The content disposition of the StorageReference.

content_encoding

const char * content_encoding() const 

Return the content encoding for the StorageReference.

See also: https://tools.ietf.org/html/rfc2616#section-14.11

Details
Returns
The content encoding for the StorageReference.

content_language

const char * content_language() const 

Return the content language for the StorageReference.

See also: https://tools.ietf.org/html/rfc2616#section-14.12

Details
Returns
The content language for the StorageReference.

content_type

const char * content_type() const 

Return the content type of the