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::Subscription Class Reference

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

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

Public Member Functions

 Subscription ()
 The default constructor creates an invalid subscription. More...
 
 Subscription (std::string project_id, std::string subscription_id)
 
std::string const & project_id () const
 Returns the Project ID. More...
 
std::string const & subscription_id () const
 Returns the Subscription ID. More...
 
std::string FullName () const
 Returns the fully qualified subscription name as a string of the form: "projects/<project-id>/subscriptions/<subscription-id>". More...
 
Copy and move
 Subscription (Subscription const &)=default
 
Subscriptionoperator= (Subscription const &)=default
 
 Subscription (Subscription &&)=default
 
Subscriptionoperator= (Subscription &&)=default
 

Friends

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

Detailed Description

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

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

◆ Subscription() [1/4]

google::cloud::pubsub::Subscription::Subscription ( )

The default constructor creates an invalid subscription.

◆ Subscription() [2/4]

google::cloud::pubsub::Subscription::Subscription ( std::string  project_id,
std::string  subscription_id 
)
inline

◆ Subscription() [3/4]

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

◆ Subscription() [4/4]

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

Member Function Documentation

◆ FullName()

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

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ project_id()

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

Returns the Project ID.

◆ subscription_id()

std::string const & google::cloud::pubsub::Subscription::subscription_id ( ) const
inline

Returns the Subscription ID.

Friends And Related Function Documentation

◆ operator!=

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

◆ operator<<

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

Output the FullName() format.

◆ operator==

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