Google Cloud Pub/Sub C++ Client  1.32.1
A C++ Client Library for Google Cloud Pub/Sub
Public Member Functions | Static Public Member Functions | List of all members
google::cloud::pubsub::v1::SubscriptionBuilder Class Reference

Create a Cloud Pub/Sub subscription configuration. More...

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

Public Member Functions

 SubscriptionBuilder ()=default
 
google::pubsub::v1::UpdateSubscriptionRequest BuildUpdateRequest (Subscription const &subscription) &&
 
google::pubsub::v1::Subscription BuildCreateRequest (Topic const &topic, Subscription const &subscription) &&
 
SubscriptionBuilderset_push_config (PushConfigBuilder v) &
 
SubscriptionBuilder && set_push_config (PushConfigBuilder v) &&
 
SubscriptionBuilderset_ack_deadline (std::chrono::seconds v) &
 
SubscriptionBuilder && set_ack_deadline (std::chrono::seconds v) &&
 
SubscriptionBuilderset_retain_acked_messages (bool v) &
 
SubscriptionBuilder && set_retain_acked_messages (bool v) &&
 
template<typename Rep , typename Period >
SubscriptionBuilderset_message_retention_duration (std::chrono::duration< Rep, Period > d) &
 
template<typename Rep , typename Period >
SubscriptionBuilder && set_message_retention_duration (std::chrono::duration< Rep, Period > d) &&
 
SubscriptionBuilderadd_label (std::string const &key, std::string const &value) &
 
SubscriptionBuilder && add_label (std::string const &key, std::string const &value) &&
 
SubscriptionBuilderset_labels (std::vector< std::pair< std::string, std::string >> new_labels) &
 
SubscriptionBuilder && set_labels (std::vector< std::pair< std::string, std::string >> new_labels) &&
 
SubscriptionBuilderclear_labels () &
 
SubscriptionBuilder && clear_labels () &&
 
SubscriptionBuilderenable_message_ordering (bool v) &
 
SubscriptionBuilder && enable_message_ordering (bool v) &&
 
SubscriptionBuilderset_expiration_policy (google::pubsub::v1::ExpirationPolicy v) &
 
SubscriptionBuilder && set_expiration_policy (google::pubsub::v1::ExpirationPolicy v) &&
 
SubscriptionBuilderset_filter (std::string v) &
 
SubscriptionBuilder && set_filter (std::string v) &&
 
SubscriptionBuilderset_dead_letter_policy (google::pubsub::v1::DeadLetterPolicy v) &
 
SubscriptionBuilder && set_dead_letter_policy (google::pubsub::v1::DeadLetterPolicy v) &&
 
SubscriptionBuilderclear_dead_letter_policy () &
 
SubscriptionBuilder && clear_dead_letter_policy () &&
 

Static Public Member Functions

template<typename Rep , typename Period >
static google::pubsub::v1::ExpirationPolicy MakeExpirationPolicy (std::chrono::duration< Rep, Period > d)
 
static google::pubsub::v1::DeadLetterPolicy MakeDeadLetterPolicy (Topic const &dead_letter_topic, std::int32_t max_delivery_attempts=0)
 

Detailed Description

Create a Cloud Pub/Sub subscription configuration.

Definition at line 129 of file subscription_builder.h.

Constructor & Destructor Documentation

◆ SubscriptionBuilder()

google::cloud::pubsub::v1::SubscriptionBuilder::SubscriptionBuilder ( )
default

Member Function Documentation

◆ add_label() [1/2]

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

Definition at line 176 of file subscription_builder.h.

◆ add_label() [2/2]

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

Definition at line 183 of file subscription_builder.h.

◆ BuildCreateRequest()

google::pubsub::v1::Subscription google::cloud::pubsub::v1::SubscriptionBuilder::BuildCreateRequest ( Topic const &  topic,
Subscription const &  subscription 
) &&

Definition at line 44 of file subscription_builder.cc.

◆ BuildUpdateRequest()

google::pubsub::v1::UpdateSubscriptionRequest google::cloud::pubsub::v1::SubscriptionBuilder::BuildUpdateRequest ( Subscription const &  subscription) &&

Definition at line 33 of file subscription_builder.cc.

◆ clear_dead_letter_policy() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::clear_dead_letter_policy ( ) &
inline

Definition at line 250 of file subscription_builder.h.

◆ clear_dead_letter_policy() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::clear_dead_letter_policy ( ) &&
inline

Definition at line 255 of file subscription_builder.h.

◆ clear_labels() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::clear_labels ( ) &
inline

Definition at line 203 of file subscription_builder.h.

◆ clear_labels() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::clear_labels ( ) &&
inline

Definition at line 208 of file subscription_builder.h.

◆ enable_message_ordering() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::enable_message_ordering ( bool  v) &
inline

Definition at line 210 of file subscription_builder.h.

◆ enable_message_ordering() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::enable_message_ordering ( bool  v) &&
inline

Definition at line 215 of file subscription_builder.h.

◆ MakeDeadLetterPolicy()

static google::pubsub::v1::DeadLetterPolicy google::cloud::pubsub::v1::SubscriptionBuilder::MakeDeadLetterPolicy ( Topic const &  dead_letter_topic,
std::int32_t  max_delivery_attempts = 0 
)
inlinestatic

Definition at line 268 of file subscription_builder.h.

◆ MakeExpirationPolicy()

template<typename Rep , typename Period >
static google::pubsub::v1::ExpirationPolicy google::cloud::pubsub::v1::SubscriptionBuilder::MakeExpirationPolicy ( std::chrono::duration< Rep, Period >  d)
inlinestatic

Definition at line 260 of file subscription_builder.h.

◆ set_ack_deadline() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::set_ack_deadline ( std::chrono::seconds  v) &
inline

Definition at line 144 of file subscription_builder.h.

◆ set_ack_deadline() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::set_ack_deadline ( std::chrono::seconds  v) &&
inline

Definition at line 149 of file subscription_builder.h.

◆ set_dead_letter_policy() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::set_dead_letter_policy ( google::pubsub::v1::DeadLetterPolicy  v) &
inline

Definition at line 239 of file subscription_builder.h.

◆ set_dead_letter_policy() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::set_dead_letter_policy ( google::pubsub::v1::DeadLetterPolicy  v) &&
inline

Definition at line 245 of file subscription_builder.h.

◆ set_expiration_policy() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::set_expiration_policy ( google::pubsub::v1::ExpirationPolicy  v) &
inline

Definition at line 219 of file subscription_builder.h.

◆ set_expiration_policy() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::set_expiration_policy ( google::pubsub::v1::ExpirationPolicy  v) &&
inline

Definition at line 225 of file subscription_builder.h.

◆ set_filter() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::set_filter ( std::string  v) &
inline

Definition at line 230 of file subscription_builder.h.

◆ set_filter() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::set_filter ( std::string  v) &&
inline

Definition at line 235 of file subscription_builder.h.

◆ set_labels() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::set_labels ( std::vector< std::pair< std::string, std::string >>  new_labels) &
inline

Definition at line 188 of file subscription_builder.h.

◆ set_labels() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::set_labels ( std::vector< std::pair< std::string, std::string >>  new_labels) &&
inline

Definition at line 198 of file subscription_builder.h.

◆ set_message_retention_duration() [1/2]

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

Definition at line 163 of file subscription_builder.h.

◆ set_message_retention_duration() [2/2]

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

Definition at line 171 of file subscription_builder.h.

◆ set_push_config() [1/2]

SubscriptionBuilder & google::cloud::pubsub::v1::SubscriptionBuilder::set_push_config ( PushConfigBuilder  v) &

Definition at line 52 of file subscription_builder.cc.

◆ set_push_config() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::set_push_config ( PushConfigBuilder  v) &&
inline

Definition at line 140 of file subscription_builder.h.

◆ set_retain_acked_messages() [1/2]

SubscriptionBuilder& google::cloud::pubsub::v1::SubscriptionBuilder::set_retain_acked_messages ( bool  v) &
inline

Definition at line 153 of file subscription_builder.h.

◆ set_retain_acked_messages() [2/2]

SubscriptionBuilder&& google::cloud::pubsub::v1::SubscriptionBuilder::set_retain_acked_messages ( bool  v) &&
inline

Definition at line 158 of file subscription_builder.h.