Google Cloud Pub/Sub C++ Client  2.4.0
A C++ Client Library for Google Cloud Pub/Sub
Public Member Functions | List of all members
google::cloud::pubsub::SnapshotBuilder Class Reference

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

#include <google/cloud/pubsub/snapshot_builder.h>

Public Member Functions

 SnapshotBuilder ()=default
 
google::pubsub::v1::CreateSnapshotRequest BuildCreateRequest (Subscription const &subscription) &&
 Build a protocol buffer message to create snapshots with server-assigned ids. More...
 
google::pubsub::v1::CreateSnapshotRequest BuildCreateRequest (Subscription const &subscription, Snapshot const &snapshot) &&
 Build a protocol buffer message to create snapshots with application-assigned ids. More...
 
google::pubsub::v1::UpdateSnapshotRequest BuildUpdateRequest (Snapshot const &snapshot) &&
 Build a protocol buffer message to update an existing snapshot. More...
 
Setters for each protocol buffer field.
SnapshotBuilderadd_label (std::string const &key, std::string const &value) &
 
SnapshotBuilder && add_label (std::string const &key, std::string const &value) &&
 
SnapshotBuilderclear_labels () &
 
SnapshotBuilder && clear_labels () &&
 

Detailed Description

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:

Definition at line 41 of file snapshot_builder.h.

Constructor & Destructor Documentation

◆ SnapshotBuilder()

google::cloud::pubsub::SnapshotBuilder::SnapshotBuilder ( )
default

Member Function Documentation

◆ add_label() [1/2]

SnapshotBuilder& google::cloud::pubsub::SnapshotBuilder::add_label ( std::string const &  key,
std::string const &  value 
) &
inline

Definition at line 61 of file snapshot_builder.h.

◆ add_label() [2/2]

SnapshotBuilder&& google::cloud::pubsub::SnapshotBuilder::add_label ( std::string const &  key,
std::string const &  value 
) &&
inline

Definition at line 69 of file snapshot_builder.h.

◆ BuildCreateRequest() [1/2]

google::pubsub::v1::CreateSnapshotRequest google::cloud::pubsub::SnapshotBuilder::BuildCreateRequest ( Subscription const &  subscription) &&

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

◆ BuildCreateRequest() [2/2]

google::pubsub::v1::CreateSnapshotRequest google::cloud::pubsub::SnapshotBuilder::BuildCreateRequest ( Subscription const &  subscription,
Snapshot const &  snapshot 
) &&

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

◆ BuildUpdateRequest()

google::pubsub::v1::UpdateSnapshotRequest google::cloud::pubsub::SnapshotBuilder::BuildUpdateRequest ( Snapshot const &  snapshot) &&

Build a protocol buffer message to update an existing snapshot.

◆ clear_labels() [1/2]

SnapshotBuilder& google::cloud::pubsub::SnapshotBuilder::clear_labels ( ) &
inline

Definition at line 74 of file snapshot_builder.h.

◆ clear_labels() [2/2]

SnapshotBuilder&& google::cloud::pubsub::SnapshotBuilder::clear_labels ( ) &&
inline

Definition at line 79 of file snapshot_builder.h.