Google Cloud Spanner C++ Client
1.32.0
A C++ Client Library for Google Cloud Spanner
|
This class identifies a Cloud Spanner Instance. More...
#include <google/cloud/spanner/instance.h>
Public Member Functions | |
Instance (Project project, std::string instance_id) | |
Constructs an Instance object identified by the given project and instance_id . More... | |
Instance (std::string project_id, std::string instance_id) | |
Constructs an Instance object identified by the given IDs. More... | |
Copy and move | |
Instance (Instance const &)=default | |
Returns the Project containing this instance. More... | |
Instance & | operator= (Instance const &)=default |
Returns the Project containing this instance. More... | |
Instance (Instance &&)=default | |
Returns the Project containing this instance. More... | |
Instance & | operator= (Instance &&)=default |
Returns the Project containing this instance. More... | |
Project const & | project () const |
Returns the Project containing this instance. More... | |
std::string const & | project_id () const |
Returns the Project containing this instance. More... | |
std::string const & | instance_id () const |
Returns the Instance ID. More... | |
std::string | FullName () const |
Returns the fully qualified instance name as a string of the form: "projects/<project-id>/instances/<instance-id>". More... | |
Equality operators | |
bool | operator== (Instance const &a, Instance const &b) |
Output the FullName() format. More... | |
bool | operator!= (Instance const &a, Instance const &b) |
Output the FullName() format. More... | |
std::ostream & | operator<< (std::ostream &, Instance const &) |
Output the FullName() format. More... | |
This class identifies a Cloud Spanner Instance.
A Cloud Spanner instance is identified by its project_id
and instance_id
.
For more info about the instance_id
format, see https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#createinstancerequest
Definition at line 42 of file instance.h.
google::cloud::spanner::v1::Instance::Instance | ( | Project | project, |
std::string | instance_id | ||
) |
Constructs an Instance object identified by the given project
and instance_id
.
Definition at line 24 of file instance.cc.
google::cloud::spanner::v1::Instance::Instance | ( | std::string | project_id, |
std::string | instance_id | ||
) |
Constructs an Instance object identified by the given IDs.
This is equivalent to first constructing a Project
from the given project_id
and then calling the Instance(Project, std::string)
constructor.
Definition at line 27 of file instance.cc.
|
default |
Returns the Project
containing this instance.
|
default |
Returns the Project
containing this instance.
std::string google::cloud::spanner::v1::Instance::FullName | ( | ) | const |
Returns the fully qualified instance name as a string of the form: "projects/<project-id>/instances/<instance-id>".
Definition at line 30 of file instance.cc.
|
inline |
Returns the Instance ID.
Definition at line 72 of file instance.h.
Returns the Project
containing this instance.
Returns the Project
containing this instance.
|
inline |
Returns the Project
containing this instance.
Definition at line 68 of file instance.h.
|
inline |
Returns the Project
containing this instance.
Definition at line 69 of file instance.h.
Output the FullName()
format.
Definition at line 38 of file instance.cc.
|
friend |
Output the FullName()
format.
Definition at line 40 of file instance.cc.
Output the FullName()
format.
Definition at line 34 of file instance.cc.