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

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

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

Public Member Functions

 Snapshot (std::string project_id, std::string snapshot_id)
 
Copy and move
 Snapshot (Snapshot const &)=default
 Returns the Project ID. More...
 
Snapshotoperator= (Snapshot const &)=default
 Returns the Project ID. More...
 
 Snapshot (Snapshot &&)=default
 Returns the Project ID. More...
 
Snapshotoperator= (Snapshot &&)=default
 Returns the Project ID. More...
 
std::string const & project_id () const
 Returns the Project ID. More...
 
std::string const & snapshot_id () const
 Returns the Snapshot ID. More...
 
std::string FullName () const
 Returns the fully qualified snapshot name as a string of the form: "projects/<project-id>/snapshots/<snapshot-id>". More...
 

Equality operators

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

Detailed Description

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

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.

Definition at line 37 of file snapshot.h.

Constructor & Destructor Documentation

◆ Snapshot() [1/3]

google::cloud::pubsub::v1::Snapshot::Snapshot ( std::string  project_id,
std::string  snapshot_id 
)
inline

Definition at line 39 of file snapshot.h.

◆ Snapshot() [2/3]

google::cloud::pubsub::v1::Snapshot::Snapshot ( Snapshot const &  )
default

Returns the Project ID.

◆ Snapshot() [3/3]

google::cloud::pubsub::v1::Snapshot::Snapshot ( Snapshot &&  )
default

Returns the Project ID.

Member Function Documentation

◆ FullName()

std::string google::cloud::pubsub::v1::Snapshot::FullName ( ) const

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

Definition at line 22 of file snapshot.cc.

◆ operator=() [1/2]

Snapshot& google::cloud::pubsub::v1::Snapshot::operator= ( Snapshot &&  )
default

Returns the Project ID.

◆ operator=() [2/2]

Snapshot& google::cloud::pubsub::v1::Snapshot::operator= ( Snapshot const &  )
default

Returns the Project ID.

◆ project_id()

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

Returns the Project ID.

Definition at line 52 of file snapshot.h.

◆ snapshot_id()

std::string const& google::cloud::pubsub::v1::Snapshot::snapshot_id ( ) const
inline

Returns the Snapshot ID.

Definition at line 55 of file snapshot.h.

Friends And Related Function Documentation

◆ operator!=

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

Output the FullName() format.

Definition at line 66 of file snapshot.h.

◆ operator<<

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

Output the FullName() format.

Definition at line 30 of file snapshot.cc.

◆ operator==

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

Output the FullName() format.

Definition at line 26 of file snapshot.cc.