Google Cloud Pub/Sub C++ Client 2.13.0
A C++ Client Library for Google Cloud Pub/Sub
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::pubsub::TopicBuilder Class Reference

Builds requests to create or update a Cloud Pub/Sub topic. More...

#include <google/cloud/pubsub/topic_builder.h>

Public Member Functions

 TopicBuilder (Topic const &topic)
 
google::pubsub::v1::Topic BuildCreateRequest () &&
 Build a protocol buffer message to create a new topic. More...
 
google::pubsub::v1::UpdateTopicRequest BuildUpdateRequest () &&
 Build a protocol buffer message to update an existing topic. More...
 
Setters for each protocol buffer field.
TopicBuilderadd_label (std::string const &key, std::string const &value) &
 
TopicBuilder && add_label (std::string const &key, std::string const &value) &&
 
TopicBuilderclear_labels () &
 
TopicBuilder && clear_labels () &&
 
TopicBuilderadd_allowed_persistence_region (std::string region) &
 
TopicBuilder && add_allowed_persistence_region (std::string region) &&
 
TopicBuilderclear_allowed_persistence_regions () &
 
TopicBuilder && clear_allowed_persistence_regions () &&
 
TopicBuilderset_kms_key_name (std::string key_name) &
 
TopicBuilder && set_kms_key_name (std::string key_name) &&
 
TopicBuilderset_schema (pubsub::Schema const &schema) &
 
TopicBuilder && set_schema (pubsub::Schema const &schema) &&
 
TopicBuilderset_encoding (google::pubsub::v1::Encoding encoding) &
 
TopicBuilder && set_encoding (google::pubsub::v1::Encoding encoding) &&
 
TopicBuilderset_first_revision_id (std::string const &revision_id) &
 
TopicBuilder && set_first_revision_id (std::string const &revision_id) &&
 
TopicBuilderset_last_revision_id (std::string const &revision_id) &
 
TopicBuilder && set_last_revision_id (std::string const &revision_id) &&
 
template<typename Rep , typename Period >
TopicBuilderset_message_retention_duration (std::chrono::duration< Rep, Period > d) &
 
template<typename Rep , typename Period >
TopicBuilder && set_message_retention_duration (std::chrono::duration< Rep, Period > d) &&
 
TopicBuilderset_message_retention_duration (google::protobuf::Duration const &d) &
 
TopicBuilder && set_message_retention_duration (google::protobuf::Duration const &d) &&
 

Detailed Description

Builds requests to create or update a Cloud Pub/Sub topic.

Makes it easier to create the protobuf messages consumed by TopicAdminClient. The main advantages are:

Constructor & Destructor Documentation

◆ TopicBuilder()

google::cloud::pubsub::TopicBuilder::TopicBuilder ( Topic const &  topic)
inlineexplicit

Member Function Documentation

◆ add_allowed_persistence_region() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::add_allowed_persistence_region ( std::string  region) &
inline

◆ add_allowed_persistence_region() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::add_allowed_persistence_region ( std::string  region) &&
inline

◆ add_label() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::add_label ( std::string const &  key,
std::string const &  value 
) &
inline

◆ add_label() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::add_label ( std::string const &  key,
std::string const &  value 
) &&
inline

◆ BuildCreateRequest()

google::pubsub::v1::Topic google::cloud::pubsub::TopicBuilder::BuildCreateRequest ( ) &&

Build a protocol buffer message to create a new topic.

◆ BuildUpdateRequest()

google::pubsub::v1::UpdateTopicRequest google::cloud::pubsub::TopicBuilder::BuildUpdateRequest ( ) &&

Build a protocol buffer message to update an existing topic.

◆ clear_allowed_persistence_regions() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::clear_allowed_persistence_regions ( ) &
inline

◆ clear_allowed_persistence_regions() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::clear_allowed_persistence_regions ( ) &&
inline

◆ clear_labels() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::clear_labels ( ) &
inline

◆ clear_labels() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::clear_labels ( ) &&
inline

◆ set_encoding() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::set_encoding ( google::pubsub::v1::Encoding  encoding) &
inline

◆ set_encoding() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::set_encoding ( google::pubsub::v1::Encoding  encoding) &&
inline

◆ set_first_revision_id() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::set_first_revision_id ( std::string const &  revision_id) &
inline

◆ set_first_revision_id() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::set_first_revision_id ( std::string const &  revision_id) &&
inline

◆ set_kms_key_name() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::set_kms_key_name ( std::string  key_name) &
inline

◆ set_kms_key_name() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::set_kms_key_name ( std::string  key_name) &&
inline

◆ set_last_revision_id() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::set_last_revision_id ( std::string const &  revision_id) &
inline

◆ set_last_revision_id() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::set_last_revision_id ( std::string const &  revision_id) &&
inline

◆ set_message_retention_duration() [1/4]

TopicBuilder & google::cloud::pubsub::TopicBuilder::set_message_retention_duration ( google::protobuf::Duration const &  d) &
inline

◆ set_message_retention_duration() [2/4]

TopicBuilder && google::cloud::pubsub::TopicBuilder::set_message_retention_duration ( google::protobuf::Duration const &  d) &&
inline

◆ set_message_retention_duration() [3/4]

template<typename Rep , typename Period >
TopicBuilder & google::cloud::pubsub::TopicBuilder::set_message_retention_duration ( std::chrono::duration< Rep, Period >  d) &
inline

◆ set_message_retention_duration() [4/4]

template<typename Rep , typename Period >
TopicBuilder && google::cloud::pubsub::TopicBuilder::set_message_retention_duration ( std::chrono::duration< Rep, Period >  d) &&
inline

◆ set_schema() [1/2]

TopicBuilder & google::cloud::pubsub::TopicBuilder::set_schema ( pubsub::Schema const &  schema) &
inline

◆ set_schema() [2/2]

TopicBuilder && google::cloud::pubsub::TopicBuilder::set_schema ( pubsub::Schema const &  schema) &&
inline