Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
instance_admin_stub.h
Go to the documentation of this file.
1 // Copyright 2021 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 // Generated by the Codegen C++ plugin.
16 // If you make any local changes, they will be lost.
17 // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto
18 
19 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_STUB_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_STUB_H
21 
22 #include "google/cloud/completion_queue.h"
23 #include "google/cloud/future.h"
24 #include "google/cloud/status_or.h"
25 #include "google/cloud/version.h"
26 #include <google/longrunning/operations.grpc.pb.h>
27 #include <google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h>
28 #include <memory>
29 
30 namespace google {
31 namespace cloud {
32 namespace spanner_admin_internal {
33 inline namespace GOOGLE_CLOUD_CPP_GENERATED_NS {
34 
36  public:
37  virtual ~InstanceAdminStub() = 0;
38 
39  virtual StatusOr<
40  google::spanner::admin::instance::v1::ListInstanceConfigsResponse>
42  grpc::ClientContext& context,
43  google::spanner::admin::instance::v1::ListInstanceConfigsRequest const&
44  request) = 0;
45 
46  virtual StatusOr<google::spanner::admin::instance::v1::InstanceConfig>
48  grpc::ClientContext& context,
49  google::spanner::admin::instance::v1::GetInstanceConfigRequest const&
50  request) = 0;
51 
52  virtual StatusOr<google::spanner::admin::instance::v1::ListInstancesResponse>
54  grpc::ClientContext& context,
55  google::spanner::admin::instance::v1::ListInstancesRequest const&
56  request) = 0;
57 
58  virtual StatusOr<google::spanner::admin::instance::v1::Instance> GetInstance(
59  grpc::ClientContext& context,
60  google::spanner::admin::instance::v1::GetInstanceRequest const&
61  request) = 0;
62 
63  virtual future<StatusOr<google::longrunning::Operation>> AsyncCreateInstance(
65  std::unique_ptr<grpc::ClientContext> context,
66  google::spanner::admin::instance::v1::CreateInstanceRequest const&
67  request) = 0;
68 
69  virtual future<StatusOr<google::longrunning::Operation>> AsyncUpdateInstance(
71  std::unique_ptr<grpc::ClientContext> context,
72  google::spanner::admin::instance::v1::UpdateInstanceRequest const&
73  request) = 0;
74 
76  grpc::ClientContext& context,
77  google::spanner::admin::instance::v1::DeleteInstanceRequest const&
78  request) = 0;
79 
80  virtual StatusOr<google::iam::v1::Policy> SetIamPolicy(
81  grpc::ClientContext& context,
82  google::iam::v1::SetIamPolicyRequest const& request) = 0;
83 
84  virtual StatusOr<google::iam::v1::Policy> GetIamPolicy(
85  grpc::ClientContext& context,
86  google::iam::v1::GetIamPolicyRequest const& request) = 0;
87 
88  virtual StatusOr<google::iam::v1::TestIamPermissionsResponse>
90  grpc::ClientContext& context,
91  google::iam::v1::TestIamPermissionsRequest const& request) = 0;
92 
93  virtual future<StatusOr<google::longrunning::Operation>> AsyncGetOperation(
95  std::unique_ptr<grpc::ClientContext> context,
96  google::longrunning::GetOperationRequest const& request) = 0;
97 
100  std::unique_ptr<grpc::ClientContext> context,
101  google::longrunning::CancelOperationRequest const& request) = 0;
102 };
103 
105  public:
107  std::unique_ptr<
108  google::spanner::admin::instance::v1::InstanceAdmin::StubInterface>
109  grpc_stub,
110  std::unique_ptr<google::longrunning::Operations::StubInterface>
111  operations)
112  : grpc_stub_(std::move(grpc_stub)), operations_(std::move(operations)) {}
113 
114  StatusOr<google::spanner::admin::instance::v1::ListInstanceConfigsResponse>
116  grpc::ClientContext& client_context,
117  google::spanner::admin::instance::v1::ListInstanceConfigsRequest const&
118  request) override;
119 
120  StatusOr<google::spanner::admin::instance::v1::InstanceConfig>
122  grpc::ClientContext& client_context,
123  google::spanner::admin::instance::v1::GetInstanceConfigRequest const&
124  request) override;
125 
126  StatusOr<google::spanner::admin::instance::v1::ListInstancesResponse>
128  grpc::ClientContext& client_context,
129  google::spanner::admin::instance::v1::ListInstancesRequest const& request)
130  override;
131 
132  StatusOr<google::spanner::admin::instance::v1::Instance> GetInstance(
133  grpc::ClientContext& client_context,
134  google::spanner::admin::instance::v1::GetInstanceRequest const& request)
135  override;
136 
137  future<StatusOr<google::longrunning::Operation>> AsyncCreateInstance(
139  std::unique_ptr<grpc::ClientContext> context,
140  google::spanner::admin::instance::v1::CreateInstanceRequest const&
141  request) override;
142 
143  future<StatusOr<google::longrunning::Operation>> AsyncUpdateInstance(
145  std::unique_ptr<grpc::ClientContext> context,
146  google::spanner::admin::instance::v1::UpdateInstanceRequest const&
147  request) override;
148 
150  grpc::ClientContext& client_context,
151  google::spanner::admin::instance::v1::DeleteInstanceRequest const&
152  request) override;
153 
154  StatusOr<google::iam::v1::Policy> SetIamPolicy(
155  grpc::ClientContext& client_context,
156  google::iam::v1::SetIamPolicyRequest const& request) override;
157 
158  StatusOr<google::iam::v1::Policy> GetIamPolicy(
159  grpc::ClientContext& client_context,
160  google::iam::v1::GetIamPolicyRequest const& request) override;
161 
162  StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissions(
163  grpc::ClientContext& client_context,
164  google::iam::v1::TestIamPermissionsRequest const& request) override;
165 
166  future<StatusOr<google::longrunning::Operation>> AsyncGetOperation(
168  std::unique_ptr<grpc::ClientContext> context,
169  google::longrunning::GetOperationRequest const& request) override;
170 
173  std::unique_ptr<grpc::ClientContext> context,
174  google::longrunning::CancelOperationRequest const& request) override;
175 
176  private:
177  std::unique_ptr<
178  google::spanner::admin::instance::v1::InstanceAdmin::StubInterface>
179  grpc_stub_;
180  std::unique_ptr<google::longrunning::Operations::StubInterface> operations_;
181 };
182 
183 } // namespace GOOGLE_CLOUD_CPP_GENERATED_NS
184 } // namespace spanner_admin_internal
185 } // namespace cloud
186 } // namespace google
187 
188 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_STUB_H