Google Cloud Spanner C++ Client
A C++ Client Library for Google Cloud Spanner
Public Member Functions | Friends | 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)
 Constructs a Backup object identified by the given backup_id and instance. 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...
 
Instance const & instance () const
 Returns the Instance containing this backup. More...
 
std::string const & backup_id () const
 
Copy and move
 Backup (Backup const &)=default
 
Backupoperator= (Backup const &)=default
 
 Backup (Backup &&)=default
 
Backupoperator= (Backup &&)=default
 

Friends

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

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 38 of file backup.h.

Constructor & Destructor Documentation

◆ Backup() [1/3]

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

Constructs a Backup object identified by the given backup_id and instance.

Definition at line 22 of file backup.cc.

◆ Backup() [2/3]

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

◆ Backup() [3/3]

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

Member Function Documentation

◆ backup_id()

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

Definition at line 60 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 25 of file backup.cc.

◆ instance()

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

Returns the Instance containing this backup.

Definition at line 59 of file backup.h.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 33 of file backup.cc.

◆ operator<<

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

Output the FullName() format.

Definition at line 35 of file backup.cc.

◆ operator==

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

Definition at line 29 of file backup.cc.