Class SubscriptionBuilder (2.30.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
Name Description
v PushConfigBuilder
Returns
Type Description
SubscriptionBuilder &

set_push_config(PushConfigBuilder) &&

Setters for each protocol buffer field.

Parameter
Name Description
v PushConfigBuilder
Returns
Type Description
SubscriptionBuilder &&

set_bigquery_config(BigQueryConfigBuilder) &

Setters for each protocol buffer field.

Parameter
Name Description
v BigQueryConfigBuilder
Returns
Type Description
SubscriptionBuilder &

set_bigquery_config(BigQueryConfigBuilder) &&

Setters for each protocol buffer field.

Parameter
Name Description
v BigQueryConfigBuilder
Returns
Type Description
SubscriptionBuilder &&

set_cloud_storage_config(CloudStorageConfigBuilder) &

Setters for each protocol buffer field.

Parameter
Name Description
v CloudStorageConfigBuilder
Returns
Type Description
SubscriptionBuilder &

set_cloud_storage_config(CloudStorageConfigBuilder) &&

Setters for each protocol buffer field.

Parameter
Name Description
v CloudStorageConfigBuilder
Returns
Type Description
SubscriptionBuilder &&

set_ack_deadline(std::chrono::seconds) &

Setters for each protocol buffer field.

Parameter
Name Description
v std::chrono::seconds
Returns
Type Description
SubscriptionBuilder &

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

Setters for each protocol buffer field.

Parameter
Name Description
v std::chrono::seconds
Returns
Type Description
SubscriptionBuilder &&

set_retain_acked_messages(bool) &

Setters for each protocol buffer field.

Parameter
Name Description
v bool
Returns
Type Description
SubscriptionBuilder &

set_retain_acked_messages(bool) &&

Setters for each protocol buffer field.

Parameter
Name Description
v bool
Returns
Type Description
SubscriptionBuilder &&

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

Setters for each protocol buffer field.

Parameters
Name Description
d std::chrono::duration< Rep, Period >
typename Rep
typename Period
Returns
Type Description
SubscriptionBuilder &

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

Setters for each protocol buffer field.

Parameters
Name Description
d std::chrono::duration< Rep, Period >
typename Rep
typename Period
Returns
Type Description
SubscriptionBuilder &&

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

Setters for each protocol buffer field.

Parameters
Name Description
key std::string const &
value std::string const &
Returns
Type Description
SubscriptionBuilder &

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

Setters for each protocol buffer field.

Parameters
Name Description
key std::string const &
value std::string const &
Returns
Type Description
SubscriptionBuilder &&

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

Setters for each protocol buffer field.

Parameter
Name Description
new_labels std::vector< std::pair< std::string, std::string > >
Returns
Type Description
SubscriptionBuilder &

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

Setters for each protocol buffer field.

Parameter
Name Description
new_labels std::vector< std::pair< std::string, std::string > >
Returns
Type Description
SubscriptionBuilder &&

clear_labels() &

Setters for each protocol buffer field.

Returns
Type Description
SubscriptionBuilder &

clear_labels() &&

Setters for each protocol buffer field.

Returns
Type Description
SubscriptionBuilder &&

enable_message_ordering(bool) &

Setters for each protocol buffer field.

Parameter
Name Description
v bool
Returns
Type Description
SubscriptionBuilder &

enable_message_ordering(bool) &&

Setters for each protocol buffer field.

Parameter
Name Description
v bool
Returns
Type Description
SubscriptionBuilder &&

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

Setters for each protocol buffer field.

Parameter
Name Description
v google::pubsub::v1::ExpirationPolicy
Returns
Type Description
SubscriptionBuilder &

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

Setters for each protocol buffer field.

Parameter
Name Description
v google::pubsub::v1::ExpirationPolicy
Returns
Type Description
SubscriptionBuilder &&

set_filter(std::string) &

Setters for each protocol buffer field.

Parameter
Name Description
v std::string
Returns
Type Description
SubscriptionBuilder &

set_filter(std::string) &&

Setters for each protocol buffer field.

Parameter
Name Description
v std::string
Returns
Type Description
SubscriptionBuilder &&

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

Setters for each protocol buffer field.

Parameter
Name Description
v google::pubsub::v1::DeadLetterPolicy
Returns
Type Description
SubscriptionBuilder &

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

Setters for each protocol buffer field.

Parameter
Name Description
v google::pubsub::v1::DeadLetterPolicy
Returns
Type Description
SubscriptionBuilder &&

clear_dead_letter_policy() &

Setters for each protocol buffer field.

Returns
Type Description
SubscriptionBuilder &

clear_dead_letter_policy() &&

Setters for each protocol buffer field.

Returns
Type Description
SubscriptionBuilder &&

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

Setters for each protocol buffer field.

Parameter
Name Description
v google::pubsub::v1::RetryPolicy
Returns
Type Description
SubscriptionBuilder &

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

Setters for each protocol buffer field.

Parameter
Name Description
v google::pubsub::v1::RetryPolicy
Returns
Type Description
SubscriptionBuilder &&

clear_retry_policy() &

Setters for each protocol buffer field.

Returns
Type Description
SubscriptionBuilder &

clear_retry_policy() &&

Setters for each protocol buffer field.

Returns
Type Description
SubscriptionBuilder &&

enable_exactly_once_delivery(bool) &

Setters for each protocol buffer field.

Parameter
Name Description
v bool
Returns
Type Description
SubscriptionBuilder &

enable_exactly_once_delivery(bool) &&

Setters for each protocol buffer field.

Parameter
Name Description
v bool
Returns
Type Description
SubscriptionBuilder &&

BuildUpdateRequest(Subscription const &) &&

Build a protocol buffer message to update an existing subscription.

Parameter
Name Description
subscription Subscription const &
Returns
Type Description
google::pubsub::v1::UpdateSubscriptionRequest

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

Build a protocol buffer message to create a new subscription.

Parameters
Name Description
topic Topic const &
subscription Subscription const &
Returns
Type Description
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
Name Description
d std::chrono::duration< Rep, Period >
typename Rep
typename Period
Returns
Type Description
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
Name Description
dead_letter_topic Topic const &
max_delivery_attempts std::int32_t
Returns
Type Description
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
Name Description
minimum_backoff std::chrono::duration< Rep1, Period1 >
maximum_backoff std::chrono::duration< Rep2, Period2 >
typename Rep1
typename Period1
typename Rep2
typename Period2
Returns
Type Description
google::pubsub::v1::RetryPolicy