Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
google::cloud::storage::NotificationMetadata Class Reference

Represents the metadata for a Google Cloud Storage Notification resource. More...

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

Public Member Functions

 NotificationMetadata ()=default
 
 NotificationMetadata (std::string id, std::string etag)
 
std::string JsonPayloadForInsert () const
 Returns the payload for a call to Notifications: insert. More...
 
std::string const & etag () const
 
std::string const & id () const
 
std::string const & kind () const
 
std::string const & object_name_prefix () const
 
NotificationMetadataset_object_name_prefix (std::string v)
 
std::string const & payload_format () const
 
NotificationMetadataset_payload_format (std::string v)
 
std::string const & self_link () const
 
std::string const & topic () const
 
NotificationMetadataset_topic (std::string v)
 
Accessors and modifiers to the custom attributes.
bool has_custom_attribute (std::string const &key) const
 Delete a custom attribute. This is a no-op if the key does not exist. More...
 
std::string const & custom_attribute (std::string const &key) const
 Delete a custom attribute. This is a no-op if the key does not exist. More...
 
NotificationMetadatadelete_custom_attribute (std::string const &key)
 Delete a custom attribute. This is a no-op if the key does not exist. More...
 
NotificationMetadataupsert_custom_attributes (std::string key, std::string value)
 Insert or update the custom attribute. More...
 
std::map< std::string, std::string > const & custom_attributes () const
 Full accessors for the custom attributes. More...
 
std::map< std::string, std::string > & mutable_custom_attributes ()
 Delete a custom attribute. This is a no-op if the key does not exist. More...
 
Accessors and modifiers to the event types list.

Define the list of event types that this notification will include.

See also
https://cloud.google.com/storage/docs/pubsub-notifications#events for a description of valid even types.
std::size_t event_type_size () const
 
std::string const & event_type (std::size_t index) const
 
NotificationMetadataappend_event_type (std::string e)
 
std::vector< std::string > const & event_types () const
 
std::vector< std::string > & mutable_event_types ()
 

Friends

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

Detailed Description

Represents the metadata for a Google Cloud Storage Notification resource.

Notifications send information about changes to objects in your buckets to Cloud Pub/Sub.

See also
https://cloud.google.com/storage/docs/pubsub-notifications for general information on Google Cloud Storage Notifications.
https://cloud.google.com/pubsub/ for general information on Google Cloud Pub/Sub service.

Constructor & Destructor Documentation

◆ NotificationMetadata() [1/2]

google::cloud::storage::NotificationMetadata::NotificationMetadata ( )
default

◆ NotificationMetadata() [2/2]

google::cloud::storage::NotificationMetadata::NotificationMetadata ( std::string  id,
std::string  etag 
)
inlineexplicit

Member Function Documentation

◆ append_event_type()

NotificationMetadata & google::cloud::storage::NotificationMetadata::append_event_type ( std::string  e)
inline

◆ custom_attribute()

std::string const & google::cloud::storage::NotificationMetadata::custom_attribute ( std::string const &  key) const
inline

Delete a custom attribute. This is a no-op if the key does not exist.

◆ custom_attributes()

std::map< std::string, std::string > const & google::cloud::storage::NotificationMetadata::custom_attributes ( ) const
inline

Full accessors for the custom attributes.

◆ delete_custom_attribute()

NotificationMetadata & google::cloud::storage::NotificationMetadata::delete_custom_attribute ( std::string const &  key)
inline

Delete a custom attribute. This is a no-op if the key does not exist.

◆ etag()

std::string const & google::cloud::storage::NotificationMetadata::etag ( ) const
inline

◆ event_type()

std::string const & google::cloud::storage::NotificationMetadata::event_type ( std::size_t  index) const
inline

◆ event_type_size()

std::size_t google::cloud::storage::NotificationMetadata::event_type_size ( ) const
inline

◆ event_types()

std::vector< std::string > const & google::cloud::storage::NotificationMetadata::event_types ( ) const
inline

◆ has_custom_attribute()

bool google::cloud::storage::NotificationMetadata::has_custom_attribute ( std::string const &  key) const
inline

Delete a custom attribute. This is a no-op if the key does not exist.

◆ id()

std::string const & google::cloud::storage::NotificationMetadata::id ( ) const
inline

◆ JsonPayloadForInsert()

std::string google::cloud::storage::NotificationMetadata::JsonPayloadForInsert ( ) const

Returns the payload for a call to Notifications: insert.

◆ kind()

std::string const & google::cloud::storage::NotificationMetadata::kind ( ) const
inline

◆ mutable_custom_attributes()

std::map< std::string, std::string > & google::cloud::storage::NotificationMetadata::mutable_custom_attributes ( )
inline

Delete a custom attribute. This is a no-op if the key does not exist.

◆ mutable_event_types()

std::vector< std::string > & google::cloud::storage::NotificationMetadata::mutable_event_types ( )
inline

◆ object_name_prefix()

std::string const & google::cloud::storage::NotificationMetadata::object_name_prefix ( ) const
inline

◆ payload_format()

std::string const & google::cloud::storage::NotificationMetadata::payload_format ( ) const
inline

◆ self_link()

std::string const & google::cloud::storage::NotificationMetadata::self_link ( ) const
inline

◆ set_object_name_prefix()

NotificationMetadata & google::cloud::storage::NotificationMetadata::set_object_name_prefix ( std::string  v)
inline

◆ set_payload_format()

NotificationMetadata & google::cloud::storage::NotificationMetadata::set_payload_format ( std::string  v)
inline

◆ set_topic()

NotificationMetadata & google::cloud::storage::NotificationMetadata::set_topic ( std::string  v)
inline

◆ topic()

std::string const & google::cloud::storage::NotificationMetadata::topic ( ) const
inline

◆ upsert_custom_attributes()

NotificationMetadata & google::cloud::storage::NotificationMetadata::upsert_custom_attributes ( std::string  key,
std::string  value 
)
inline

Insert or update the custom attribute.

Friends And Related Function Documentation

◆ operator<<

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