19 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_STUB_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_STUB_H
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/database/v1/spanner_database_admin.grpc.pb.h>
39 virtual StatusOr<
google::spanner::admin::database::v1::ListDatabasesResponse>
41 grpc::ClientContext& context,
42 google::spanner::admin::database::v1::ListDatabasesRequest
const&
47 std::unique_ptr<grpc::ClientContext> context,
48 google::spanner::admin::database::v1::CreateDatabaseRequest
const&
52 grpc::ClientContext& context,
53 google::spanner::admin::database::v1::GetDatabaseRequest
const&
59 std::unique_ptr<grpc::ClientContext> context,
60 google::spanner::admin::database::v1::UpdateDatabaseDdlRequest
const&
64 grpc::ClientContext& context,
65 google::spanner::admin::database::v1::DropDatabaseRequest
const&
68 virtual StatusOr<
google::spanner::admin::database::v1::GetDatabaseDdlResponse>
70 grpc::ClientContext& context,
71 google::spanner::admin::database::v1::GetDatabaseDdlRequest
const&
75 grpc::ClientContext& context,
76 google::iam::v1::SetIamPolicyRequest
const& request) = 0;
79 grpc::ClientContext& context,
80 google::iam::v1::GetIamPolicyRequest
const& request) = 0;
82 virtual StatusOr<
google::iam::v1::TestIamPermissionsResponse>
84 grpc::ClientContext& context,
85 google::iam::v1::TestIamPermissionsRequest
const& request) = 0;
89 std::unique_ptr<grpc::ClientContext> context,
90 google::spanner::admin::database::v1::CreateBackupRequest
const&
94 grpc::ClientContext& context,
95 google::spanner::admin::database::v1::GetBackupRequest
const&
99 grpc::ClientContext& context,
100 google::spanner::admin::database::v1::UpdateBackupRequest
const&
104 grpc::ClientContext& context,
105 google::spanner::admin::database::v1::DeleteBackupRequest
const&
108 virtual StatusOr<
google::spanner::admin::database::v1::ListBackupsResponse>
110 google::spanner::admin::database::v1::ListBackupsRequest
const&
115 std::unique_ptr<grpc::ClientContext> context,
116 google::spanner::admin::database::v1::RestoreDatabaseRequest
const&
120 google::spanner::admin::database::v1::ListDatabaseOperationsResponse>
122 grpc::ClientContext& context,
123 google::spanner::admin::database::v1::ListDatabaseOperationsRequest
const&
127 google::spanner::admin::database::v1::ListBackupOperationsResponse>
129 grpc::ClientContext& context,
130 google::spanner::admin::database::v1::ListBackupOperationsRequest
const&
135 std::unique_ptr<grpc::ClientContext> context,
136 google::longrunning::GetOperationRequest
const& request) = 0;
140 std::unique_ptr<grpc::ClientContext> context,
141 google::longrunning::CancelOperationRequest
const& request) = 0;
148 google::spanner::admin::database::v1::DatabaseAdmin::StubInterface>
150 std::unique_ptr<
google::longrunning::Operations::StubInterface>
152 : grpc_stub_(std::move(grpc_stub)), operations_(std::move(operations)) {}
154 StatusOr<
google::spanner::admin::database::v1::ListDatabasesResponse>
156 grpc::ClientContext& client_context,
157 google::spanner::admin::database::v1::ListDatabasesRequest
const& request)
162 std::unique_ptr<grpc::ClientContext> context,
163 google::spanner::admin::database::v1::CreateDatabaseRequest
const&
167 grpc::ClientContext& client_context,
168 google::spanner::admin::database::v1::GetDatabaseRequest
const& request)
173 std::unique_ptr<grpc::ClientContext> context,
174 google::spanner::admin::database::v1::UpdateDatabaseDdlRequest
const&
178 grpc::ClientContext& client_context,
179 google::spanner::admin::database::v1::DropDatabaseRequest
const& request)
182 StatusOr<
google::spanner::admin::database::v1::GetDatabaseDdlResponse>
184 grpc::ClientContext& client_context,
185 google::spanner::admin::database::v1::GetDatabaseDdlRequest
const&
189 grpc::ClientContext& client_context,
190 google::iam::v1::SetIamPolicyRequest
const& request)
override;
193 grpc::ClientContext& client_context,
194 google::iam::v1::GetIamPolicyRequest
const& request)
override;
197 grpc::ClientContext& client_context,
198 google::iam::v1::TestIamPermissionsRequest
const& request)
override;
202 std::unique_ptr<grpc::ClientContext> context,
203 google::spanner::admin::database::v1::CreateBackupRequest
const& request)
207 grpc::ClientContext& client_context,
208 google::spanner::admin::database::v1::GetBackupRequest
const& request)
212 grpc::ClientContext& client_context,
213 google::spanner::admin::database::v1::UpdateBackupRequest
const& request)
217 grpc::ClientContext& client_context,
218 google::spanner::admin::database::v1::DeleteBackupRequest
const& request)
221 StatusOr<
google::spanner::admin::database::v1::ListBackupsResponse>
223 google::spanner::admin::database::v1::ListBackupsRequest
const&
228 std::unique_ptr<grpc::ClientContext> context,
229 google::spanner::admin::database::v1::RestoreDatabaseRequest
const&
232 StatusOr<
google::spanner::admin::database::v1::ListDatabaseOperationsResponse>
234 grpc::ClientContext& client_context,
235 google::spanner::admin::database::v1::ListDatabaseOperationsRequest
const&
238 StatusOr<
google::spanner::admin::database::v1::ListBackupOperationsResponse>
240 grpc::ClientContext& client_context,
241 google::spanner::admin::database::v1::ListBackupOperationsRequest
const&
246 std::unique_ptr<grpc::ClientContext> context,
247 google::longrunning::GetOperationRequest
const& request)
override;
251 std::unique_ptr<grpc::ClientContext> context,
252 google::longrunning::CancelOperationRequest
const& request)
override;
256 google::spanner::admin::database::v1::DatabaseAdmin::StubInterface>
258 std::unique_ptr<
google::longrunning::Operations::StubInterface> operations_;