Google Cloud Storage C++ Client  1.31.1
A C++ Client Library for Google Cloud Storage
Public Member Functions | List of all members
google::cloud::storage::v1::ObjectMetadata Class Reference

Represents the metadata for a Google Cloud Storage Object. More...

#include <google/cloud/storage/object_metadata.h>

Public Member Functions

 ObjectMetadata ()=default
 
std::vector< ObjectAccessControl > const & acl () const
 
std::vector< ObjectAccessControl > & mutable_acl ()
 
ObjectMetadataset_acl (std::vector< ObjectAccessControl > acl)
 
std::string const & bucket () const
 
std::string const & cache_control () const
 
ObjectMetadataset_cache_control (std::string cache_control)
 
std::int32_t component_count () const
 
std::string content_disposition () const
 
ObjectMetadataset_content_disposition (std::string value)
 
std::string content_encoding () const
 
ObjectMetadataset_content_encoding (std::string value)
 
std::string content_language () const
 
ObjectMetadataset_content_language (std::string value)
 
std::string content_type () const
 
ObjectMetadataset_content_type (std::string value)
 
std::string const & crc32c () const
 
bool has_customer_encryption () const
 
CustomerEncryption const & customer_encryption () const
 
bool event_based_hold () const
 
ObjectMetadataset_event_based_hold (bool v)
 
std::int64_t generation () const
 
std::string const & kms_key_name () const
 
std::string const & md5_hash () const
 
std::string const & media_link () const
 

Accessors and modifiers to the <tt>metadata</tt> labels.

bool has_metadata (std::string const &key) const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
std::string const & metadata (std::string const &key) const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
ObjectMetadatadelete_metadata (std::string const &key)
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
ObjectMetadataupsert_metadata (std::string key, std::string value)
 Insert or update the metadata entry. More...
 
std::map< std::string, std::string > const & metadata () const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
std::map< std::string, std::string > & mutable_metadata ()
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
std::chrono::system_clock::time_point retention_expiration_time () const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
std::uint64_t size () const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
ObjectMetadataset_storage_class (std::string v)
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
bool temporary_hold () const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
ObjectMetadataset_temporary_hold (bool v)
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
std::chrono::system_clock::time_point time_deleted () const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
std::chrono::system_clock::time_point time_storage_class_updated () const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
bool has_custom_time () const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
std::chrono::system_clock::time_point custom_time () const
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
ObjectMetadataset_custom_time (std::chrono::system_clock::time_point v)
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
ObjectMetadatareset_custom_time ()
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
bool operator== (ObjectMetadata const &lhs, ObjectMetadata const &rhs)
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
bool operator!= (ObjectMetadata const &lhs, ObjectMetadata const &rhs)
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 
std::ostream & operator<< (std::ostream &os, ObjectMetadata const &rhs)
 Delete a metadata entry. This is a no-op if the key does not exist. More...
 

Detailed Description

Represents the metadata for a Google Cloud Storage Object.

Definition at line 91 of file object_metadata.h.

Constructor & Destructor Documentation

◆ ObjectMetadata()

google::cloud::storage::v1::ObjectMetadata::ObjectMetadata ( )
default

Member Function Documentation

◆ acl()

std::vector<ObjectAccessControl> const& google::cloud::storage::v1::ObjectMetadata::acl ( ) const
inline

Definition at line 97 of file object_metadata.h.

◆ bucket()

std::string const& google::cloud::storage::v1::ObjectMetadata::bucket ( ) const
inline

Definition at line 104 of file object_metadata.h.

◆ cache_control()

std::string const& google::cloud::storage::v1::ObjectMetadata::cache_control ( ) const
inline

Definition at line 106 of file object_metadata.h.

◆ component_count()

std::int32_t google::cloud::storage::v1::ObjectMetadata::component_count ( ) const
inline

Definition at line 112 of file object_metadata.h.

◆ content_disposition()

std::string google::cloud::storage::v1::ObjectMetadata::content_disposition ( ) const
inline

Definition at line 114 of file object_metadata.h.

◆ content_encoding()

std::string google::cloud::storage::v1::ObjectMetadata::content_encoding ( ) const
inline

Definition at line 120 of file object_metadata.h.

◆ content_language()

std::string google::cloud::storage::v1::ObjectMetadata::content_language ( ) const
inline

Definition at line 126 of file object_metadata.h.

◆ content_type()

std::string google::cloud::storage::v1::ObjectMetadata::content_type ( ) const
inline

Definition at line 132 of file object_metadata.h.

◆ crc32c()

std::string const& google::cloud::storage::v1::ObjectMetadata::crc32c ( ) const
inline

Definition at line 138 of file object_metadata.h.

◆ custom_time()

std::chrono::system_clock::time_point google::cloud::storage::v1::ObjectMetadata::custom_time ( ) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 237 of file object_metadata.h.

◆ customer_encryption()

CustomerEncryption const& google::cloud::storage::v1::ObjectMetadata::customer_encryption ( ) const
inline

Definition at line 143 of file object_metadata.h.

◆ delete_metadata()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::delete_metadata ( std::string const &  key)
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 174 of file object_metadata.h.

◆ event_based_hold()

bool google::cloud::storage::v1::ObjectMetadata::event_based_hold ( ) const
inline

Definition at line 149 of file object_metadata.h.

◆ generation()

std::int64_t google::cloud::storage::v1::ObjectMetadata::generation ( ) const
inline

Definition at line 155 of file object_metadata.h.

◆ has_custom_time()

bool google::cloud::storage::v1::ObjectMetadata::has_custom_time ( ) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 236 of file object_metadata.h.

◆ has_customer_encryption()

bool google::cloud::storage::v1::ObjectMetadata::has_customer_encryption ( ) const
inline

Definition at line 140 of file object_metadata.h.

◆ has_metadata()

bool google::cloud::storage::v1::ObjectMetadata::has_metadata ( std::string const &  key) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 166 of file object_metadata.h.

◆ kms_key_name()

std::string const& google::cloud::storage::v1::ObjectMetadata::kms_key_name ( ) const
inline

Definition at line 160 of file object_metadata.h.

◆ md5_hash()

std::string const& google::cloud::storage::v1::ObjectMetadata::md5_hash ( ) const
inline

Definition at line 161 of file object_metadata.h.

◆ media_link()

std::string const& google::cloud::storage::v1::ObjectMetadata::media_link ( ) const
inline

Definition at line 162 of file object_metadata.h.

◆ metadata() [1/2]

std::map<std::string, std::string> const& google::cloud::storage::v1::ObjectMetadata::metadata ( ) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 194 of file object_metadata.h.

◆ metadata() [2/2]

std::string const& google::cloud::storage::v1::ObjectMetadata::metadata ( std::string const &  key) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 169 of file object_metadata.h.

◆ mutable_acl()

std::vector<ObjectAccessControl>& google::cloud::storage::v1::ObjectMetadata::mutable_acl ( )
inline

Definition at line 98 of file object_metadata.h.

◆ mutable_metadata()

std::map<std::string, std::string>& google::cloud::storage::v1::ObjectMetadata::mutable_metadata ( )
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 197 of file object_metadata.h.

◆ reset_custom_time()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::reset_custom_time ( )
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 244 of file object_metadata.h.

◆ retention_expiration_time()

std::chrono::system_clock::time_point google::cloud::storage::v1::ObjectMetadata::retention_expiration_time ( ) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 205 of file object_metadata.h.

◆ set_acl()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_acl ( std::vector< ObjectAccessControl acl)
inline

Definition at line 99 of file object_metadata.h.

◆ set_cache_control()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_cache_control ( std::string  cache_control)
inline

Definition at line 107 of file object_metadata.h.

◆ set_content_disposition()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_content_disposition ( std::string  value)
inline

Definition at line 115 of file object_metadata.h.

◆ set_content_encoding()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_content_encoding ( std::string  value)
inline

Definition at line 121 of file object_metadata.h.

◆ set_content_language()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_content_language ( std::string  value)
inline

Definition at line 127 of file object_metadata.h.

◆ set_content_type()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_content_type ( std::string  value)
inline

Definition at line 133 of file object_metadata.h.

◆ set_custom_time()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_custom_time ( std::chrono::system_clock::time_point  v)
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 240 of file object_metadata.h.

◆ set_event_based_hold()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_event_based_hold ( bool  v)
inline

Definition at line 150 of file object_metadata.h.

◆ set_storage_class()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_storage_class ( std::string  v)
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 214 of file object_metadata.h.

◆ set_temporary_hold()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::set_temporary_hold ( bool  v)
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 220 of file object_metadata.h.

◆ size()

std::uint64_t google::cloud::storage::v1::ObjectMetadata::size ( ) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 211 of file object_metadata.h.

◆ temporary_hold()

bool google::cloud::storage::v1::ObjectMetadata::temporary_hold ( ) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 219 of file object_metadata.h.

◆ time_deleted()

std::chrono::system_clock::time_point google::cloud::storage::v1::ObjectMetadata::time_deleted ( ) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 227 of file object_metadata.h.

◆ time_storage_class_updated()

std::chrono::system_clock::time_point google::cloud::storage::v1::ObjectMetadata::time_storage_class_updated ( ) const
inline

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 230 of file object_metadata.h.

◆ upsert_metadata()

ObjectMetadata& google::cloud::storage::v1::ObjectMetadata::upsert_metadata ( std::string  key,
std::string  value 
)
inline

Insert or update the metadata entry.

Definition at line 184 of file object_metadata.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( ObjectMetadata const &  lhs,
ObjectMetadata const &  rhs 
)
friend

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 250 of file object_metadata.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
ObjectMetadata const &  rhs 
)
friend

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 52 of file object_metadata.cc.

◆ operator==

bool operator== ( ObjectMetadata const &  lhs,
ObjectMetadata const &  rhs 
)
friend

Delete a metadata entry. This is a no-op if the key does not exist.

Definition at line 29 of file object_metadata.cc.