Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
database_admin_connection.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_DATABASE_ADMIN_CONNECTION_H
20 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_DATABASE_ADMIN_CONNECTION_H
21 
22 #include "google/cloud/spanner/admin/database_admin_connection_idempotency_policy.h"
23 #include "google/cloud/spanner/admin/internal/database_admin_stub.h"
24 #include "google/cloud/spanner/admin/retry_traits.h"
25 #include "google/cloud/backoff_policy.h"
26 #include "google/cloud/future.h"
27 #include "google/cloud/options.h"
28 #include "google/cloud/polling_policy.h"
29 #include "google/cloud/status_or.h"
30 #include "google/cloud/stream_range.h"
31 #include "google/cloud/version.h"
32 #include <google/longrunning/operations.grpc.pb.h>
33 #include <memory>
34 
35 namespace google {
36 namespace cloud {
37 namespace spanner_admin {
38 inline namespace GOOGLE_CLOUD_CPP_GENERATED_NS {
39 
40 using DatabaseAdminRetryPolicy =
41  ::google::cloud::internal::TraitBasedRetryPolicy<
43 
44 using DatabaseAdminLimitedTimeRetryPolicy =
45  ::google::cloud::internal::LimitedTimeRetryPolicy<
47 
48 using DatabaseAdminLimitedErrorCountRetryPolicy =
49  ::google::cloud::internal::LimitedErrorCountRetryPolicy<
51 
53  public:
54  virtual ~DatabaseAdminConnection() = 0;
55 
56  virtual StreamRange<google::spanner::admin::database::v1::Database>
58  google::spanner::admin::database::v1::ListDatabasesRequest request);
59 
60  virtual future<StatusOr<google::spanner::admin::database::v1::Database>>
62  google::spanner::admin::database::v1::CreateDatabaseRequest const&
63  request);
64 
65  virtual StatusOr<google::spanner::admin::database::v1::Database> GetDatabase(
66  google::spanner::admin::database::v1::GetDatabaseRequest const& request);
67 
68  virtual future<
69  StatusOr<google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata>>
71  google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const&
72  request);
73 
74  virtual Status DropDatabase(
75  google::spanner::admin::database::v1::DropDatabaseRequest const& request);
76 
77  virtual StatusOr<google::spanner::admin::database::v1::GetDatabaseDdlResponse>
79  google::spanner::admin::database::v1::GetDatabaseDdlRequest const&
80  request);
81 
82  virtual StatusOr<google::iam::v1::Policy> SetIamPolicy(
83  google::iam::v1::SetIamPolicyRequest const& request);
84 
85  virtual StatusOr<google::iam::v1::Policy> GetIamPolicy(
86  google::iam::v1::GetIamPolicyRequest const& request);
87 
88  virtual StatusOr<google::iam::v1::TestIamPermissionsResponse>
89  TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const& request);
90 
91  virtual future<StatusOr<google::spanner::admin::database::v1::Backup>>
93  google::spanner::admin::database::v1::CreateBackupRequest const& request);
94 
95  virtual StatusOr<google::spanner::admin::database::v1::Backup> GetBackup(
96  google::spanner::admin::database::v1::GetBackupRequest const& request);
97 
98  virtual StatusOr<google::spanner::admin::database::v1::Backup> UpdateBackup(
99  google::spanner::admin::database::v1::UpdateBackupRequest const& request);
100 
101  virtual Status DeleteBackup(
102  google::spanner::admin::database::v1::DeleteBackupRequest const& request);
103 
104  virtual StreamRange<google::spanner::admin::database::v1::Backup> ListBackups(
105  google::spanner::admin::database::v1::ListBackupsRequest request);
106 
107  virtual future<StatusOr<google::spanner::admin::database::v1::Database>>
109  google::spanner::admin::database::v1::RestoreDatabaseRequest const&
110  request);
111 
112  virtual StreamRange<google::longrunning::Operation> ListDatabaseOperations(
113  google::spanner::admin::database::v1::ListDatabaseOperationsRequest
114  request);
115 
116  virtual StreamRange<google::longrunning::Operation> ListBackupOperations(
117  google::spanner::admin::database::v1::ListBackupOperationsRequest
118  request);
119 };
120 
122  Options options = {});
123 
124 } // namespace GOOGLE_CLOUD_CPP_GENERATED_NS
125 } // namespace spanner_admin
126 } // namespace cloud
127 } // namespace google
128 
129 namespace google {
130 namespace cloud {
131 namespace spanner_admin_internal {
132 inline namespace GOOGLE_CLOUD_CPP_GENERATED_NS {
133 
134 std::shared_ptr<spanner_admin::DatabaseAdminConnection>
135 MakeDatabaseAdminConnection(std::shared_ptr<DatabaseAdminStub> stub,
136  Options options);
137 
138 } // namespace GOOGLE_CLOUD_CPP_GENERATED_NS
139 } // namespace spanner_admin_internal
140 } // namespace cloud
141 } // namespace google
142 
143 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_DATABASE_ADMIN_CONNECTION_H