Google Cloud Pub/Sub C++ Client 2.13.0
A C++ Client Library for Google Cloud Pub/Sub
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
google::cloud::pubsub::Topic Class Reference

Objects of this class identify a Cloud Pub/Sub topic. More...

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

Public Member Functions

 Topic (std::string project_id, std::string topic_id)
 
std::string const & project_id () const
 Returns the Project ID. More...
 
std::string const & topic_id () const
 Returns the Topic ID. More...
 
std::string FullName () const
 Returns the fully qualified topic name as a string of the form: "projects/<project-id>/topics/<topic-id>". More...
 
Copy and move
 Topic (Topic const &)=default
 
Topicoperator= (Topic const &)=default
 
 Topic (Topic &&)=default
 
Topicoperator= (Topic &&)=default
 

Friends

std::ostream & operator<< (std::ostream &os, Topic const &rhs)
 Output the FullName() format. More...
 
Equality operators
bool operator== (Topic const &a, Topic const &b)
 
bool operator!= (Topic const &a, Topic const &b)
 

Detailed Description

Objects of this class identify a Cloud Pub/Sub topic.

Note
This class makes no effort to validate the ids provided. The application should verify that any ids passed to this application conform to the Cloud Pub/Sub resource name restrictions.

Constructor & Destructor Documentation

◆ Topic() [1/3]

google::cloud::pubsub::Topic::Topic ( std::string  project_id,
std::string  topic_id 
)
inline

◆ Topic() [2/3]

google::cloud::pubsub::Topic::Topic ( Topic const &  )
default

◆ Topic() [3/3]

google::cloud::pubsub::Topic::Topic ( Topic &&  )
default

Member Function Documentation

◆ FullName()

std::string google::cloud::pubsub::Topic::FullName ( ) const

Returns the fully qualified topic name as a string of the form: "projects/<project-id>/topics/<topic-id>".

◆ operator=() [1/2]

Topic & google::cloud::pubsub::Topic::operator= ( Topic &&  )
default

◆ operator=() [2/2]

Topic & google::cloud::pubsub::Topic::operator= ( Topic const &  )
default

◆ project_id()

std::string const & google::cloud::pubsub::Topic::project_id ( ) const
inline

Returns the Project ID.

◆ topic_id()

std::string const & google::cloud::pubsub::Topic::topic_id ( ) const
inline

Returns the Topic ID.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( Topic const &  a,
Topic const &  b 
)
friend

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
Topic const &  rhs 
)
friend

Output the FullName() format.

◆ operator==

bool operator== ( Topic const &  a,
Topic const &  b 
)
friend