15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIPTION_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIPTION_H
18#include "google/cloud/pubsub/version.h"
19#include <grpcpp/grpcpp.h>
25GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
28
29
30
31
32
33
34
35
36
41 Subscription(std::string project_id, std::string subscription_id)
42 : project_id_(std::move(project_id)),
43 subscription_id_(std::move(subscription_id)) {}
54 std::string
const&
project_id()
const {
return project_id_; }
60
61
62
74 friend std::ostream& operator<<(std::ostream& os,
Subscription const& rhs);
77 std::string project_id_;
78 std::string subscription_id_;
81GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Objects of this class identify a Cloud Pub/Sub subscription.
Definition: subscription.h:37
Subscription(Subscription const &)=default
std::string const & subscription_id() const
Returns the Subscription ID.
Definition: subscription.h:57
Subscription()
The default constructor creates an invalid subscription.
Subscription & operator=(Subscription &&)=default
std::string FullName() const
Returns the fully qualified subscription name as a string of the form: "projects/<project-id>/subscri...
friend bool operator!=(Subscription const &a, Subscription const &b)
Definition: subscription.h:68
Subscription(Subscription &&)=default
Subscription & operator=(Subscription const &)=default
Subscription(std::string project_id, std::string subscription_id)
Definition: subscription.h:41
friend bool operator==(Subscription const &a, Subscription const &b)
std::string const & project_id() const
Returns the Project ID.
Definition: subscription.h:54
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
The namespace Google Cloud Platform C++ client libraries.