Class TopicBuilder (2.18.0)

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:

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

Constructors

TopicBuilder(Topic const &)

Parameter
Name Description
topic Topic const &

Functions

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
TopicBuilder &

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
TopicBuilder &&

clear_labels() &

Setters for each protocol buffer field.

Returns
Type Description
TopicBuilder &

clear_labels() &&

Setters for each protocol buffer field.

Returns
Type Description
TopicBuilder &&

add_allowed_persistence_region(std::string) &

Setters for each protocol buffer field.

Parameter
Name Description
region std::string
Returns
Type Description
TopicBuilder &

add_allowed_persistence_region(std::string) &&

Setters for each protocol buffer field.

Parameter
Name Description
region std::string
Returns
Type Description
TopicBuilder &&

clear_allowed_persistence_regions() &

Setters for each protocol buffer field.

Returns
Type Description
TopicBuilder &

clear_allowed_persistence_regions() &&

Setters for each protocol buffer field.

Returns
Type Description
TopicBuilder &&

set_kms_key_name(std::string) &

Setters for each protocol buffer field.

Parameter
Name Description
key_name std::string
Returns
Type Description
TopicBuilder &

set_kms_key_name(std::string) &&

Setters for each protocol buffer field.

Parameter
Name Description
key_name std::string
Returns
Type Description
TopicBuilder &&

set_schema(pubsub::Schema const &) &

Setters for each protocol buffer field.

Parameter
Name Description
schema pubsub::Schema const &
Returns
Type Description
TopicBuilder &

set_schema(pubsub::Schema const &) &&

Setters for each protocol buffer field.

Parameter
Name Description
schema pubsub::Schema const &
Returns
Type Description
TopicBuilder &&

set_encoding(google::pubsub::v1::Encoding) &

Setters for each protocol buffer field.

Parameter
Name Description
encoding google::pubsub::v1::Encoding
Returns
Type Description
TopicBuilder &

set_encoding(google::pubsub::v1::Encoding) &&

Setters for each protocol buffer field.

Parameter
Name Description
encoding google::pubsub::v1::Encoding
Returns
Type Description
TopicBuilder &&

set_first_revision_id(std::string const &) &

Setters for each protocol buffer field.

Parameter
Name Description
revision_id std::string const &
Returns
Type Description
TopicBuilder &

set_first_revision_id(std::string const &) &&

Setters for each protocol buffer field.

Parameter
Name Description
revision_id std::string const &
Returns
Type Description
TopicBuilder &&

set_last_revision_id(std::string const &) &

Setters for each protocol buffer field.

Parameter
Name Description
revision_id std::string const &
Returns
Type Description
TopicBuilder &

set_last_revision_id(std::string const &) &&

Setters for each protocol buffer field.

Parameter
Name Description
revision_id std::string const &
Returns
Type Description
TopicBuilder &&

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
TopicBuilder &

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
TopicBuilder &&

set_message_retention_duration(google::protobuf::Duration const &) &

Setters for each protocol buffer field.

Parameter
Name Description
d google::protobuf::Duration const &
Returns
Type Description
TopicBuilder &

set_message_retention_duration(google::protobuf::Duration const &) &&

Setters for each protocol buffer field.

Parameter
Name Description
d google::protobuf::Duration const &
Returns
Type Description
TopicBuilder &&

BuildCreateRequest() &&

Build a protocol buffer message to create a new topic.

Returns
Type Description
google::pubsub::v1::Topic

BuildUpdateRequest() &&

Build a protocol buffer message to update an existing topic.

Returns
Type Description
google::pubsub::v1::UpdateTopicRequest