19 #include "google/cloud/spanner/admin/internal/database_admin_logging_decorator.h"
20 #include "google/cloud/internal/log_wrapper.h"
21 #include "google/cloud/status_or.h"
22 #include <google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h>
32 std::set<std::string> components)
33 : child_(std::move(child)),
34 tracing_options_
(std::move(tracing_options)
),
35 components_(std::move(components)) {}
37 StatusOr<
google::spanner::admin::database::v1::ListDatabasesResponse>
39 grpc::ClientContext& context,
40 google::spanner::admin::database::v1::ListDatabasesRequest
const& request) {
42 [
this](grpc::ClientContext& context,
43 google::spanner::admin::database::v1::ListDatabasesRequest
const&
45 context, request,
__func__, tracing_options_);
51 std::unique_ptr<grpc::ClientContext> context,
52 google::spanner::admin::database::v1::CreateDatabaseRequest
const&
56 std::unique_ptr<grpc::ClientContext> context,
57 google::spanner::admin::database::v1::CreateDatabaseRequest
const&
61 cq, std::move(context), request,
__func__, tracing_options_);
64 StatusOr<
google::spanner::admin::database::v1::Database>
66 grpc::ClientContext& context,
67 google::spanner::admin::database::v1::GetDatabaseRequest
const& request) {
69 [
this](grpc::ClientContext& context,
70 google::spanner::admin::database::v1::GetDatabaseRequest
const&
72 context, request,
__func__, tracing_options_);
78 std::unique_ptr<grpc::ClientContext> context,
79 google::spanner::admin::database::v1::UpdateDatabaseDdlRequest
const&
84 std::unique_ptr<grpc::ClientContext> context,
85 google::spanner::admin::database::v1::UpdateDatabaseDdlRequest
const&
89 cq, std::move(context), request,
__func__, tracing_options_);
93 grpc::ClientContext& context,
94 google::spanner::admin::database::v1::DropDatabaseRequest
const& request) {
96 [
this](grpc::ClientContext& context,
97 google::spanner::admin::database::v1::DropDatabaseRequest
const&
99 context, request,
__func__, tracing_options_);
102 StatusOr<
google::spanner::admin::database::v1::GetDatabaseDdlResponse>
104 grpc::ClientContext& context,
105 google::spanner::admin::database::v1::GetDatabaseDdlRequest
const&
108 [
this](grpc::ClientContext& context,
109 google::spanner::admin::database::v1::GetDatabaseDdlRequest
const&
111 context, request,
__func__, tracing_options_);
115 grpc::ClientContext& context,
116 google::iam::v1::SetIamPolicyRequest
const& request) {
118 [
this](grpc::ClientContext& context,
119 google::iam::v1::SetIamPolicyRequest
const& request) {
122 context, request,
__func__, tracing_options_);
126 grpc::ClientContext& context,
127 google::iam::v1::GetIamPolicyRequest
const& request) {
129 [
this](grpc::ClientContext& context,
130 google::iam::v1::GetIamPolicyRequest
const& request) {
133 context, request,
__func__, tracing_options_);
136 StatusOr<
google::iam::v1::TestIamPermissionsResponse>
138 grpc::ClientContext& context,
139 google::iam::v1::TestIamPermissionsRequest
const& request) {
141 [
this](grpc::ClientContext& context,
142 google::iam::v1::TestIamPermissionsRequest
const& request) {
145 context, request,
__func__, tracing_options_);
151 std::unique_ptr<grpc::ClientContext> context,
152 google::spanner::admin::database::v1::CreateBackupRequest
const& request) {
155 std::unique_ptr<grpc::ClientContext> context,
156 google::spanner::admin::database::v1::CreateBackupRequest
const&
160 cq, std::move(context), request,
__func__, tracing_options_);
163 StatusOr<
google::spanner::admin::database::v1::Backup>
165 grpc::ClientContext& context,
166 google::spanner::admin::database::v1::GetBackupRequest
const& request) {
168 [
this](grpc::ClientContext& context,
169 google::spanner::admin::database::v1::GetBackupRequest
const&
170 request) {
return child_->
GetBackup(context
, request
); },
171 context, request,
__func__, tracing_options_);
174 StatusOr<
google::spanner::admin::database::v1::Backup>
176 grpc::ClientContext& context,
177 google::spanner::admin::database::v1::UpdateBackupRequest
const& request) {
179 [
this](grpc::ClientContext& context,
180 google::spanner::admin::database::v1::UpdateBackupRequest
const&
182 context, request,
__func__, tracing_options_);
186 grpc::ClientContext& context,
187 google::spanner::admin::database::v1::DeleteBackupRequest
const& request) {
189 [
this](grpc::ClientContext& context,
190 google::spanner::admin::database::v1::DeleteBackupRequest
const&
192 context, request,
__func__, tracing_options_);
195 StatusOr<
google::spanner::admin::database::v1::ListBackupsResponse>
197 grpc::ClientContext& context,
198 google::spanner::admin::database::v1::ListBackupsRequest
const& request) {
200 [
this](grpc::ClientContext& context,
201 google::spanner::admin::database::v1::ListBackupsRequest
const&
203 context, request,
__func__, tracing_options_);
209 std::unique_ptr<grpc::ClientContext> context,
210 google::spanner::admin::database::v1::RestoreDatabaseRequest
const&
214 std::unique_ptr<grpc::ClientContext> context,
215 google::spanner::admin::database::v1::RestoreDatabaseRequest
const&
219 cq, std::move(context), request,
__func__, tracing_options_);
222 StatusOr<
google::spanner::admin::database::v1::ListDatabaseOperationsResponse>
224 grpc::ClientContext& context,
225 google::spanner::admin::database::v1::ListDatabaseOperationsRequest
const&
228 [
this](grpc::ClientContext& context,
229 google::spanner::admin::database::v1::
230 ListDatabaseOperationsRequest
const& request) {
233 context, request,
__func__, tracing_options_);
236 StatusOr<
google::spanner::admin::database::v1::ListBackupOperationsResponse>
238 grpc::ClientContext& context,
239 google::spanner::admin::database::v1::ListBackupOperationsRequest
const&
242 [
this](grpc::ClientContext& context,
243 google::spanner::admin::database::v1::
244 ListBackupOperationsRequest
const& request) {
247 context, request,
__func__, tracing_options_);
253 std::unique_ptr<grpc::ClientContext> context,
254 google::longrunning::GetOperationRequest
const& request) {
257 std::unique_ptr<grpc::ClientContext> context,
258 google::longrunning::GetOperationRequest
const& request) {
261 cq, std::move(context), request,
__func__, tracing_options_);
266 std::unique_ptr<grpc::ClientContext> context,
267 google::longrunning::CancelOperationRequest
const& request) {
270 std::unique_ptr<grpc::ClientContext> context,
271 google::longrunning::CancelOperationRequest
const& request) {
274 cq, std::move(context), request,
__func__, tracing_options_);