Google Cloud Storage C++ Client  1.32.1
A C++ Client Library for Google Cloud Storage
Public Member Functions | List of all members
google::cloud::storage::v1::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...
 
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...
 
std::string const & etag () const
 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 ()
 
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)
 
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.

Definition at line 43 of file notification_metadata.h.

Constructor & Destructor Documentation

◆ NotificationMetadata() [1/2]

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

◆ NotificationMetadata() [2/2]

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

Definition at line 47 of file notification_metadata.h.

Member Function Documentation

◆ append_event_type()

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

Definition at line 112 of file notification_metadata.h.

◆ custom_attribute()

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

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

Definition at line 61 of file notification_metadata.h.

◆ custom_attributes()

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

Full accessors for the custom attributes.

Definition at line 88 of file notification_metadata.h.

◆ delete_custom_attribute()

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

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

Definition at line 66 of file notification_metadata.h.

◆ etag()

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

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

Definition at line 96 of file notification_metadata.h.

◆ event_type()

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

Definition at line 108 of file notification_metadata.h.

◆ event_type_size()

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

Definition at line 107 of file notification_metadata.h.

◆ event_types()

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

Definition at line 117 of file notification_metadata.h.

◆ has_custom_attribute()

bool google::cloud::storage::v1::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.

Definition at line 57 of file notification_metadata.h.

◆ id()

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

Definition at line 121 of file notification_metadata.h.

◆ JsonPayloadForInsert()

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

Returns the payload for a call to Notifications: insert.

Definition at line 24 of file notification_metadata.cc.

◆ kind()

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

Definition at line 122 of file notification_metadata.h.

◆ mutable_custom_attributes()

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

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

Definition at line 91 of file notification_metadata.h.

◆ mutable_event_types()

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

Definition at line 118 of file notification_metadata.h.

◆ object_name_prefix()

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

Definition at line 124 of file notification_metadata.h.

◆ payload_format()

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

Definition at line 130 of file notification_metadata.h.

◆ self_link()

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

Definition at line 136 of file notification_metadata.h.

◆ set_object_name_prefix()

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

Definition at line 125 of file notification_metadata.h.

◆ set_payload_format()

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

Definition at line 131 of file notification_metadata.h.

◆ set_topic()

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

Definition at line 139 of file notification_metadata.h.

◆ topic()

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

Definition at line 138 of file notification_metadata.h.

◆ upsert_custom_attributes()

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

Insert or update the custom attribute.

Definition at line 76 of file notification_metadata.h.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 56 of file notification_metadata.cc.