Class TopicBuilder (2.20.0-rc)

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
NameDescription
topic Topic const &

Functions

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

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

clear_labels() &

Setters for each protocol buffer field.

Returns
TypeDescription
TopicBuilder &

clear_labels() &&

Setters for each protocol buffer field.

Returns
TypeDescription
TopicBuilder &&

add_allowed_persistence_region(std::string) &

Setters for each protocol buffer field.

Parameter
NameDescription
region std::string
Returns
TypeDescription
TopicBuilder &

add_allowed_persistence_region(std::string) &&

Setters for each protocol buffer field.

Parameter
NameDescription
region std::string
Returns
TypeDescription
TopicBuilder &&

clear_allowed_persistence_regions() &

Setters for each protocol buffer field.

Returns
TypeDescription
TopicBuilder &

clear_allowed_persistence_regions() &&

Setters for each protocol buffer field.

Returns
TypeDescription
TopicBuilder &&

set_kms_key_name(std::string) &

Setters for each protocol buffer field.

Parameter
NameDescription
key_name std::string
Returns
TypeDescription
TopicBuilder &

set_kms_key_name(std::string) &&

Setters for each protocol buffer field.

Parameter
NameDescription
key_name std::string
Returns
TypeDescription
TopicBuilder &&

set_schema(pubsub::Schema const &) &

Setters for each protocol buffer field.

Parameter
NameDescription
schema pubsub::Schema const &
Returns
TypeDescription
TopicBuilder &

set_schema(pubsub::Schema const &) &&

Setters for each protocol buffer field.

Parameter
NameDescription
schema pubsub::Schema const &
Returns
TypeDescription
TopicBuilder &&

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

Setters for each protocol buffer field.

Parameter
NameDescription
encoding google::pubsub::v1::Encoding
Returns
TypeDescription
TopicBuilder &

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

Setters for each protocol buffer field.

Parameter
NameDescription
encoding google::pubsub::v1::Encoding
Returns
TypeDescription
TopicBuilder &&

set_first_revision_id(std::string const &) &

Setters for each protocol buffer field.

Parameter
NameDescription
revision_id std::string const &
Returns
TypeDescription
TopicBuilder &

set_first_revision_id(std::string const &) &&

Setters for each protocol buffer field.

Parameter
NameDescription
revision_id std::string const &
Returns
TypeDescription
TopicBuilder &&

set_last_revision_id(std::string const &) &

Setters for each protocol buffer field.

Parameter
NameDescription
revision_id std::string const &
Returns
TypeDescription
TopicBuilder &

set_last_revision_id(std::string const &) &&

Setters for each protocol buffer field.

Parameter
NameDescription
revision_id std::string const &
Returns
TypeDescription
TopicBuilder &&

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

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

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

Setters for each protocol buffer field.

Parameter
NameDescription
d google::protobuf::Duration const &
Returns
TypeDescription
TopicBuilder &

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

Setters for each protocol buffer field.

Parameter
NameDescription
d google::protobuf::Duration const &
Returns
TypeDescription
TopicBuilder &&

BuildCreateRequest() &&

Build a protocol buffer message to create a new topic.

Returns
TypeDescription
google::pubsub::v1::Topic

BuildUpdateRequest() &&

Build a protocol buffer message to update an existing topic.

Returns
TypeDescription
google::pubsub::v1::UpdateTopicRequest