Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
database_admin_logging_decorator.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/database/v1/spanner_database_admin.proto
18 
19 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_LOGGING_DECORATOR_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_LOGGING_DECORATOR_H
21 
22 #include "google/cloud/spanner/admin/internal/database_admin_stub.h"
23 #include "google/cloud/tracing_options.h"
24 #include "google/cloud/version.h"
25 #include <google/longrunning/operations.grpc.pb.h>
26 #include <memory>
27 #include <set>
28 #include <string>
29 
30 namespace google {
31 namespace cloud {
32 namespace spanner_admin_internal {
33 inline namespace GOOGLE_CLOUD_CPP_GENERATED_NS {
34 
36  public:
37  ~DatabaseAdminLogging() override = default;
38  DatabaseAdminLogging(std::shared_ptr<DatabaseAdminStub> child,
39  TracingOptions tracing_options,
40  std::set<std::string> components);
41 
42  StatusOr<google::spanner::admin::database::v1::ListDatabasesResponse>
44  grpc::ClientContext& context,
45  google::spanner::admin::database::v1::ListDatabasesRequest const& request)
46  override;
47 
48  future<StatusOr<google::longrunning::Operation>> AsyncCreateDatabase(
50  std::unique_ptr<grpc::ClientContext> context,
51  google::spanner::admin::database::v1::CreateDatabaseRequest const&
52  request) override;
53 
54  StatusOr<google::spanner::admin::database::v1::Database> GetDatabase(
55  grpc::ClientContext& context,
56  google::spanner::admin::database::v1::GetDatabaseRequest const& request)
57  override;
58 
59  future<StatusOr<google::longrunning::Operation>> AsyncUpdateDatabaseDdl(
61  std::unique_ptr<grpc::ClientContext> context,
62  google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const&
63  request) override;
64 
66  grpc::ClientContext& context,
67  google::spanner::admin::database::v1::DropDatabaseRequest const& request)
68  override;
69 
70  StatusOr<google::spanner::admin::database::v1::GetDatabaseDdlResponse>
72  grpc::ClientContext& context,
73  google::spanner::admin::database::v1::GetDatabaseDdlRequest const&
74  request) override;
75 
76  StatusOr<google::iam::v1::Policy> SetIamPolicy(
77  grpc::ClientContext& context,
78  google::iam::v1::SetIamPolicyRequest const& request) override;
79 
80  StatusOr<google::iam::v1::Policy> GetIamPolicy(
81  grpc::ClientContext& context,
82  google::iam::v1::GetIamPolicyRequest const& request) override;
83 
84  StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissions(
85  grpc::ClientContext& context,
86  google::iam::v1::TestIamPermissionsRequest const& request) override;
87 
88  future<StatusOr<google::longrunning::Operation>> AsyncCreateBackup(
90  std::unique_ptr<grpc::ClientContext> context,
91  google::spanner::admin::database::v1::CreateBackupRequest const& request)
92  override;
93 
94  StatusOr<google::spanner::admin::database::v1::Backup> GetBackup(
95  grpc::ClientContext& context,
96  google::spanner::admin::database::v1::GetBackupRequest const& request)
97  override;
98 
99  StatusOr<google::spanner::admin::database::v1::Backup> UpdateBackup(
100  grpc::ClientContext& context,
101  google::spanner::admin::database::v1::UpdateBackupRequest const& request)
102  override;
103 
105  grpc::ClientContext& context,
106  google::spanner::admin::database::v1::DeleteBackupRequest const& request)
107  override;
108 
109  StatusOr<google::spanner::admin::database::v1::ListBackupsResponse>
110  ListBackups(grpc::ClientContext& context,
111  google::spanner::admin::database::v1::ListBackupsRequest const&
112  request) override;
113 
114  future<StatusOr<google::longrunning::Operation>> AsyncRestoreDatabase(
116  std::unique_ptr<grpc::ClientContext> context,
117  google::spanner::admin::database::v1::RestoreDatabaseRequest const&
118  request) override;
119 
120  StatusOr<google::spanner::admin::database::v1::ListDatabaseOperationsResponse>
122  grpc::ClientContext& context,
123  google::spanner::admin::database::v1::ListDatabaseOperationsRequest const&
124  request) override;
125 
126  StatusOr<google::spanner::admin::database::v1::ListBackupOperationsResponse>
128  grpc::ClientContext& context,
129  google::spanner::admin::database::v1::ListBackupOperationsRequest const&
130  request) override;
131 
132  future<StatusOr<google::longrunning::Operation>> AsyncGetOperation(
134  std::unique_ptr<grpc::ClientContext> context,
135  google::longrunning::GetOperationRequest const& request) override;
136 
139  std::unique_ptr<grpc::ClientContext> context,
140  google::longrunning::CancelOperationRequest const& request) override;
141 
142  private:
143  std::shared_ptr<DatabaseAdminStub> child_;
144  TracingOptions tracing_options_;
145  std::set<std::string> components_;
146 }; // DatabaseAdminLogging
147 
148 } // namespace GOOGLE_CLOUD_CPP_GENERATED_NS
149 } // namespace spanner_admin_internal
150 } // namespace cloud
151 } // namespace google
152 
153 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_LOGGING_DECORATOR_H