Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
Public Member Functions | List of all members
google::cloud::spanner::v1::Backup Class Reference

This class identifies a Cloud Spanner Backup. More...

#include <google/cloud/spanner/backup.h>

Public Member Functions

 Backup (Instance instance, std::string backup_id)
 
Copy and move
 Backup (Backup const &)=default
 Returns the Instance containing this backup. More...
 
Backupoperator= (Backup const &)=default
 Returns the Instance containing this backup. More...
 
 Backup (Backup &&)=default
 Returns the Instance containing this backup. More...
 
Backupoperator= (Backup &&)=default
 Returns the Instance containing this backup. More...
 
Instance const & instance () const
 Returns the Instance containing this backup. More...
 
std::string const & backup_id () const
 Returns the Backup ID. More...
 
std::string FullName () const
 Returns the fully qualified backup name as a string of the form: "projects/<project-id>/instances/<instance-id>/backups/<backup-id>". More...
 

Equality operators

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

Detailed Description

This class identifies a Cloud Spanner Backup.

A Cloud Spanner backup is identified by an Instance and a backup_id.

Note
This class makes no effort to validate the components of the backup name. It is the application's responsibility to provide valid project, instance, and backup ids. Passing invalid values will not be checked until the backup name is used in a RPC to spanner.

Definition at line 39 of file backup.h.

Constructor & Destructor Documentation

◆ Backup() [1/3]

google::cloud::spanner::v1::Backup::Backup ( Instance  instance,
std::string  backup_id 
)

Definition at line 24 of file backup.cc.

◆ Backup() [2/3]

google::cloud::spanner::v1::Backup::Backup ( Backup const &  )
default

Returns the Instance containing this backup.

◆ Backup() [3/3]

google::cloud::spanner::v1::Backup::Backup ( Backup &&  )
default

Returns the Instance containing this backup.

Member Function Documentation

◆ backup_id()

std::string const& google::cloud::spanner::v1::Backup::backup_id ( ) const
inline

Returns the Backup ID.

Definition at line 59 of file backup.h.

◆ FullName()

std::string google::cloud::spanner::v1::Backup::FullName ( ) const

Returns the fully qualified backup name as a string of the form: "projects/<project-id>/instances/<instance-id>/backups/<backup-id>".

Definition at line 27 of file backup.cc.

◆ instance()

Instance const& google::cloud::spanner::v1::Backup::instance ( ) const
inline

Returns the Instance containing this backup.

Definition at line 56 of file backup.h.

◆ operator=() [1/2]

Backup& google::cloud::spanner::v1::Backup::operator= ( Backup &&  )
default

Returns the Instance containing this backup.

◆ operator=() [2/2]

Backup& google::cloud::spanner::v1::Backup::operator= ( Backup const &  )
default

Returns the Instance containing this backup.

Friends And Related Function Documentation

◆ operator!=

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

Output the FullName() format.

Definition at line 35 of file backup.cc.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
Backup const &  bu 
)
friend

Output the FullName() format.

Definition at line 37 of file backup.cc.

◆ operator==

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

Output the FullName() format.

Definition at line 31 of file backup.cc.