15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_H
18#include "google/cloud/spanner/version.h"
19#include "google/cloud/project.h"
20#include "google/cloud/status_or.h"
27GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
30
31
32
33
34
35
36
37
38
39
40
41
45
46
47
51
52
53
54
55
56
57 Instance(std::string project_id, std::string instance_id);
72 std::string
const&
instance_id()
const {
return instance_id_; }
75
76
77
87 friend std::ostream& operator<<(std::ostream&,
Instance const&);
91 std::string instance_id_;
95
96
97
100GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
std::string const & project_id() const
This class identifies a Cloud Spanner Instance.
Definition: instance.h:42
Instance(Project project, std::string instance_id)
Constructs an Instance object identified by the given project and instance_id.
std::string FullName() const
Returns the fully qualified instance name as a string of the form: "projects/<project-id>/instances/<...
friend bool operator==(Instance const &a, Instance const &b)
Project const & project() const
Returns the Project containing this instance.
Definition: instance.h:68
Instance(Instance &&)=default
friend bool operator!=(Instance const &a, Instance const &b)
Instance & operator=(Instance const &)=default
std::string const & project_id() const
Definition: instance.h:69
Instance & operator=(Instance &&)=default
Instance(std::string project_id, std::string instance_id)
Constructs an Instance object identified by the given IDs.
std::string const & instance_id() const
Returns the Instance ID.
Definition: instance.h:72
Instance(Instance const &)=default
Contains all the Cloud Spanner C++ client types and functions.
Definition: backoff_policy.h:23
StatusOr< Instance > MakeInstance(std::string const &full_name)
Constructs an Instance from the given full_name.