Class SnapshotBuilder (2.21.0)

Build a request to create a Cloud Pub/Sub snapshot.

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

SnapshotBuilder()

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

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

clear_labels() &

Setters for each protocol buffer field.

Returns
TypeDescription
SnapshotBuilder &

clear_labels() &&

Setters for each protocol buffer field.

Returns
TypeDescription
SnapshotBuilder &&

BuildCreateRequest(Subscription const &) &&

Build a protocol buffer message to create snapshots with server-assigned ids.

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

BuildCreateRequest(Subscription const &, Snapshot const &) &&

Build a protocol buffer message to create snapshots with application-assigned ids.

Parameters
NameDescription
subscription Subscription const &
snapshot Snapshot const &
Returns
TypeDescription
google::pubsub::v1::CreateSnapshotRequest

BuildUpdateRequest(Snapshot const &) &&

Build a protocol buffer message to update an existing snapshot.

Parameter
NameDescription
snapshot Snapshot const &
Returns
TypeDescription
google::pubsub::v1::UpdateSnapshotRequest