Class SubscriptionBuilder (2.22.0)

Create a Cloud Pub/Sub subscription configuration.

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

  • Use a fluent API to set multiple values when constructing complex objects.
  • Automatically compute the set of paths for update requests.

Constructors

SubscriptionBuilder()

Functions

set_push_config(PushConfigBuilder) &

Setters for each protocol buffer field.

Parameter
NameDescription
v PushConfigBuilder
Returns
TypeDescription
SubscriptionBuilder &

set_push_config(PushConfigBuilder) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v PushConfigBuilder
Returns
TypeDescription
SubscriptionBuilder &&

set_bigquery_config(BigQueryConfigBuilder) &

Setters for each protocol buffer field.

Parameter
NameDescription
v BigQueryConfigBuilder
Returns
TypeDescription
SubscriptionBuilder &

set_bigquery_config(BigQueryConfigBuilder) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v BigQueryConfigBuilder
Returns
TypeDescription
SubscriptionBuilder &&

set_cloud_storage_config(CloudStorageConfigBuilder) &

Setters for each protocol buffer field.

Parameter
NameDescription
v CloudStorageConfigBuilder
Returns
TypeDescription
SubscriptionBuilder &

set_cloud_storage_config(CloudStorageConfigBuilder) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v CloudStorageConfigBuilder
Returns
TypeDescription
SubscriptionBuilder &&

set_ack_deadline(std::chrono::seconds) &

Setters for each protocol buffer field.

Parameter
NameDescription
v std::chrono::seconds
Returns
TypeDescription
SubscriptionBuilder &

set_ack_deadline(std::chrono::seconds) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v std::chrono::seconds
Returns
TypeDescription
SubscriptionBuilder &&

set_retain_acked_messages(bool) &

Setters for each protocol buffer field.

Parameter
NameDescription
v bool
Returns
TypeDescription
SubscriptionBuilder &

set_retain_acked_messages(bool) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v bool
Returns
TypeDescription
SubscriptionBuilder &&

set_message_retention_duration(std::chrono::duration< Rep, Period >) &

Setters for each protocol buffer field.

Parameters
NameDescription
d std::chrono::duration< Rep, Period >
typename Rep
typename Period
Returns
TypeDescription
SubscriptionBuilder &

set_message_retention_duration(std::chrono::duration< Rep, Period >) &&

Setters for each protocol buffer field.

Parameters
NameDescription
d std::chrono::duration< Rep, Period >
typename Rep
typename Period
Returns
TypeDescription
SubscriptionBuilder &&

add_label(std::string const &, std::string const &) &

Setters for each protocol buffer field.

Parameters
NameDescription
key std::string const &
value std::string const &
Returns
TypeDescription
SubscriptionBuilder &

add_label(std::string const &, std::string const &) &&

Setters for each protocol buffer field.

Parameters
NameDescription
key std::string const &
value std::string const &
Returns
TypeDescription
SubscriptionBuilder &&

set_labels(std::vector< std::pair< std::string, std::string > >) &

Setters for each protocol buffer field.

Parameter
NameDescription
new_labels std::vector< std::pair< std::string, std::string > >
Returns
TypeDescription
SubscriptionBuilder &

set_labels(std::vector< std::pair< std::string, std::string > >) &&

Setters for each protocol buffer field.

Parameter
NameDescription
new_labels std::vector< std::pair< std::string, std::string > >
Returns
TypeDescription
SubscriptionBuilder &&

clear_labels() &

Setters for each protocol buffer field.

Returns
TypeDescription
SubscriptionBuilder &

clear_labels() &&

Setters for each protocol buffer field.

Returns
TypeDescription
SubscriptionBuilder &&

enable_message_ordering(bool) &

Setters for each protocol buffer field.

Parameter
NameDescription
v bool
Returns
TypeDescription
SubscriptionBuilder &

enable_message_ordering(bool) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v bool
Returns
TypeDescription
SubscriptionBuilder &&

set_expiration_policy(google::pubsub::v1::ExpirationPolicy) &

Setters for each protocol buffer field.

Parameter
NameDescription
v google::pubsub::v1::ExpirationPolicy
Returns
TypeDescription
SubscriptionBuilder &

set_expiration_policy(google::pubsub::v1::ExpirationPolicy) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v google::pubsub::v1::ExpirationPolicy
Returns
TypeDescription
SubscriptionBuilder &&

set_filter(std::string) &

Setters for each protocol buffer field.

Parameter
NameDescription
v std::string
Returns
TypeDescription
SubscriptionBuilder &

set_filter(std::string) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v std::string
Returns
TypeDescription
SubscriptionBuilder &&

set_dead_letter_policy(google::pubsub::v1::DeadLetterPolicy) &

Setters for each protocol buffer field.

Parameter
NameDescription
v google::pubsub::v1::DeadLetterPolicy
Returns
TypeDescription
SubscriptionBuilder &

set_dead_letter_policy(google::pubsub::v1::DeadLetterPolicy) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v google::pubsub::v1::DeadLetterPolicy
Returns
TypeDescription
SubscriptionBuilder &&

clear_dead_letter_policy() &

Setters for each protocol buffer field.

Returns
TypeDescription
SubscriptionBuilder &

clear_dead_letter_policy() &&

Setters for each protocol buffer field.

Returns
TypeDescription
SubscriptionBuilder &&

set_retry_policy(google::pubsub::v1::RetryPolicy) &

Setters for each protocol buffer field.

Parameter
NameDescription
v google::pubsub::v1::RetryPolicy
Returns
TypeDescription
SubscriptionBuilder &

set_retry_policy(google::pubsub::v1::RetryPolicy) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v google::pubsub::v1::RetryPolicy
Returns
TypeDescription
SubscriptionBuilder &&

clear_retry_policy() &

Setters for each protocol buffer field.

Returns
TypeDescription
SubscriptionBuilder &

clear_retry_policy() &&

Setters for each protocol buffer field.

Returns
TypeDescription
SubscriptionBuilder &&

enable_exactly_once_delivery(bool) &

Setters for each protocol buffer field.

Parameter
NameDescription
v bool
Returns
TypeDescription
SubscriptionBuilder &

enable_exactly_once_delivery(bool) &&

Setters for each protocol buffer field.

Parameter
NameDescription
v bool
Returns
TypeDescription
SubscriptionBuilder &&

BuildUpdateRequest(Subscription const &) &&

Build a protocol buffer message to update an existing subscription.

Parameter
NameDescription
subscription Subscription const &
Returns
TypeDescription
google::pubsub::v1::UpdateSubscriptionRequest

BuildCreateRequest(Topic const &, Subscription const &) &&

Build a protocol buffer message to create a new subscription.

Parameters
NameDescription
topic Topic const &
subscription Subscription const &
Returns
TypeDescription
google::pubsub::v1::Subscription

static MakeExpirationPolicy(std::chrono::duration< Rep, Period >)

Construct a google::pubsub::v1::ExpirationPolicy using a C++ duration.

This is a convenience function to create the set_expiration_policy() argument.

Parameters
NameDescription
d std::chrono::duration< Rep, Period >
typename Rep
typename Period
Returns
TypeDescription
google::pubsub::v1::ExpirationPolicy

static MakeDeadLetterPolicy(Topic const &, std::int32_t)

Construct a google::pubsub::v1::DeadLetterPolicy.

This is a convenience function to create the set_dead_letter_policy() argument.

Parameters
NameDescription
dead_letter_topic Topic const &
max_delivery_attempts std::int32_t
Returns
TypeDescription
google::pubsub::v1::DeadLetterPolicy

static MakeRetryPolicy(std::chrono::duration< Rep1, Period1 >, std::chrono::duration< Rep2, Period2 >)

Construct a google::pubsub::v1::RetryPolicy using C++ durations.

This is a convenience function to create the set_retry_policy() argument.

Parameters
NameDescription
minimum_backoff std::chrono::duration< Rep1, Period1 >
maximum_backoff std::chrono::duration< Rep2, Period2 >
typename Rep1
typename Period1
typename Rep2
typename Period2
Returns
TypeDescription
google::pubsub::v1::RetryPolicy