15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_TOPIC_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_TOPIC_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
39 Topic(std::string project_id, std::string topic_id)
40 : project_id_(std::move(project_id)), topic_id_(std::move(topic_id)) {}
51 std::string
const&
project_id()
const {
return project_id_; }
54 std::string
const&
topic_id()
const {
return topic_id_; }
57
58
59
69 friend std::ostream& operator<<(std::ostream& os,
Topic const& rhs);
72 std::string project_id_;
73 std::string topic_id_;
76GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Objects of this class identify a Cloud Pub/Sub topic.
Definition: topic.h:37
Topic & operator=(Topic &&)=default
Topic & operator=(Topic const &)=default
Topic(std::string project_id, std::string topic_id)
Definition: topic.h:39
std::string const & project_id() const
Returns the Project ID.
Definition: topic.h:51
Topic(Topic const &)=default
std::string FullName() const
Returns the fully qualified topic name as a string of the form: "projects/<project-id>/topics/<topic-...
std::string const & topic_id() const
Returns the Topic ID.
Definition: topic.h:54
friend bool operator!=(Topic const &a, Topic const &b)
Definition: topic.h:65
friend bool operator==(Topic const &a, Topic const &b)
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
The namespace Google Cloud Platform C++ client libraries.