Google Cloud Bigtable C++ Client 2.13.0
A C++ Client Library for Google Cloud Bigtable
Loading...
Searching...
No Matches
bigtable_table_admin_connection.h
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/bigtable/admin/v2/bigtable_table_admin.proto
18
19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_BIGTABLE_TABLE_ADMIN_CONNECTION_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_BIGTABLE_TABLE_ADMIN_CONNECTION_H
21
22#include "google/cloud/bigtable/admin/bigtable_table_admin_connection_idempotency_policy.h"
23#include "google/cloud/bigtable/admin/internal/bigtable_table_admin_retry_traits.h"
24#include "google/cloud/backoff_policy.h"
25#include "google/cloud/future.h"
26#include "google/cloud/options.h"
27#include "google/cloud/polling_policy.h"
28#include "google/cloud/status_or.h"
29#include "google/cloud/stream_range.h"
30#include "google/cloud/version.h"
31#include <google/bigtable/admin/v2/bigtable_table_admin.pb.h>
32#include <google/longrunning/operations.grpc.pb.h>
33#include <memory>
34
35namespace google {
36namespace cloud {
37namespace bigtable_admin {
38GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
39
40using BigtableTableAdminRetryPolicy =
41 ::google::cloud::internal::TraitBasedRetryPolicy<
42 bigtable_admin_internal::BigtableTableAdminRetryTraits>;
43
44using BigtableTableAdminLimitedTimeRetryPolicy =
45 ::google::cloud::internal::LimitedTimeRetryPolicy<
46 bigtable_admin_internal::BigtableTableAdminRetryTraits>;
47
48using BigtableTableAdminLimitedErrorCountRetryPolicy =
49 ::google::cloud::internal::LimitedErrorCountRetryPolicy<
50 bigtable_admin_internal::BigtableTableAdminRetryTraits>;
51
52/**
53 * The `BigtableTableAdminConnection` object for `BigtableTableAdminClient`.
54 *
55 * This interface defines virtual methods for each of the user-facing overload
56 * sets in `BigtableTableAdminClient`. This allows users to inject custom
57 * behavior (e.g., with a Google Mock object) when writing tests that use
58 * objects of type `BigtableTableAdminClient`.
59 *
60 * To create a concrete instance, see `MakeBigtableTableAdminConnection()`.
61 *
62 * For mocking, see `bigtable_admin_mocks::MockBigtableTableAdminConnection`.
63 */
65 public:
66 virtual ~BigtableTableAdminConnection() = 0;
67
68 virtual Options options() { return Options{}; }
69
70 virtual StatusOr<google::bigtable::admin::v2::Table> CreateTable(
71 google::bigtable::admin::v2::CreateTableRequest const& request);
72
73 virtual StreamRange<google::bigtable::admin::v2::Table> ListTables(
74 google::bigtable::admin::v2::ListTablesRequest request);
75
76 virtual StatusOr<google::bigtable::admin::v2::Table> GetTable(
77 google::bigtable::admin::v2::GetTableRequest const& request);
78
79 virtual future<StatusOr<google::bigtable::admin::v2::Table>> UpdateTable(
80 google::bigtable::admin::v2::UpdateTableRequest const& request);
81
82 virtual Status DeleteTable(
83 google::bigtable::admin::v2::DeleteTableRequest const& request);
84
85 virtual future<StatusOr<google::bigtable::admin::v2::Table>> UndeleteTable(
86 google::bigtable::admin::v2::UndeleteTableRequest const& request);
87
88 virtual StatusOr<google::bigtable::admin::v2::Table> ModifyColumnFamilies(
89 google::bigtable::admin::v2::ModifyColumnFamiliesRequest const& request);
90
91 virtual Status DropRowRange(
92 google::bigtable::admin::v2::DropRowRangeRequest const& request);
93
94 virtual StatusOr<
95 google::bigtable::admin::v2::GenerateConsistencyTokenResponse>
97 google::bigtable::admin::v2::GenerateConsistencyTokenRequest const&
98 request);
99
100 virtual StatusOr<google::bigtable::admin::v2::CheckConsistencyResponse>
102 google::bigtable::admin::v2::CheckConsistencyRequest const& request);
103
104 virtual future<StatusOr<google::bigtable::admin::v2::Backup>> CreateBackup(
105 google::bigtable::admin::v2::CreateBackupRequest const& request);
106
107 virtual StatusOr<google::bigtable::admin::v2::Backup> GetBackup(
108 google::bigtable::admin::v2::GetBackupRequest const& request);
109
110 virtual StatusOr<google::bigtable::admin::v2::Backup> UpdateBackup(
111 google::bigtable::admin::v2::UpdateBackupRequest const& request);
112
113 virtual Status DeleteBackup(
114 google::bigtable::admin::v2::DeleteBackupRequest const& request);
115
116 virtual StreamRange<google::bigtable::admin::v2::Backup> ListBackups(
117 google::bigtable::admin::v2::ListBackupsRequest request);
118
119 virtual future<StatusOr<google::bigtable::admin::v2::Table>> RestoreTable(
120 google::bigtable::admin::v2::RestoreTableRequest const& request);
121
122 virtual StatusOr<google::iam::v1::Policy> GetIamPolicy(
123 google::iam::v1::GetIamPolicyRequest const& request);
124
125 virtual StatusOr<google::iam::v1::Policy> SetIamPolicy(
126 google::iam::v1::SetIamPolicyRequest const& request);
127
128 virtual StatusOr<google::iam::v1::TestIamPermissionsResponse>
129 TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const& request);
130
131 virtual future<
132 StatusOr<google::bigtable::admin::v2::CheckConsistencyResponse>>
134 google::bigtable::admin::v2::CheckConsistencyRequest const& request);
135};
136
137/**
138 * A factory function to construct an object of type
139 * `BigtableTableAdminConnection`.
140 *
141 * The returned connection object should not be used directly; instead it
142 * should be passed as an argument to the constructor of
143 * BigtableTableAdminClient.
144 *
145 * The optional @p options argument may be used to configure aspects of the
146 * returned `BigtableTableAdminConnection`. Expected options are any of the
147 * types in the following option lists:
148 *
149 * - `google::cloud::CommonOptionList`
150 * - `google::cloud::GrpcOptionList`
151 * - `google::cloud::UnifiedCredentialsOptionList`
152 * - `google::cloud::bigtable_admin::BigtableTableAdminPolicyOptionList`
153 *
154 * @note Unexpected options will be ignored. To log unexpected options instead,
155 * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.
156 *
157 * @param options (optional) Configure the `BigtableTableAdminConnection`
158 * created by this function.
159 */
161 Options options = {});
162
163GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
164} // namespace bigtable_admin
165} // namespace cloud
166} // namespace google
167
168#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_BIGTABLE_TABLE_ADMIN_CONNECTION_H
The BigtableTableAdminConnection object for BigtableTableAdminClient.
Definition: bigtable_table_admin_connection.h:64
virtual future< StatusOr< google::bigtable::admin::v2::Table > > UndeleteTable(google::bigtable::admin::v2::UndeleteTableRequest const &request)
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &request)
virtual StatusOr< google::bigtable::admin::v2::Backup > GetBackup(google::bigtable::admin::v2::GetBackupRequest const &request)
virtual Status DeleteTable(google::bigtable::admin::v2::DeleteTableRequest const &request)
virtual StatusOr< google::bigtable::admin::v2::CheckConsistencyResponse > CheckConsistency(google::bigtable::admin::v2::CheckConsistencyRequest const &request)
virtual StatusOr< google::bigtable::admin::v2::Backup > UpdateBackup(google::bigtable::admin::v2::UpdateBackupRequest const &request)
virtual StatusOr< google::bigtable::admin::v2::Table > CreateTable(google::bigtable::admin::v2::CreateTableRequest const &request)
virtual Status DropRowRange(google::bigtable::admin::v2::DropRowRangeRequest const &request)
virtual StatusOr< google::bigtable::admin::v2::GenerateConsistencyTokenResponse > GenerateConsistencyToken(google::bigtable::admin::v2::GenerateConsistencyTokenRequest const &request)
virtual future< StatusOr< google::bigtable::admin::v2::CheckConsistencyResponse > > AsyncCheckConsistency(google::bigtable::admin::v2::CheckConsistencyRequest const &request)
virtual future< StatusOr< google::bigtable::admin::v2::Table > > RestoreTable(google::bigtable::admin::v2::RestoreTableRequest const &request)
virtual StreamRange< google::bigtable::admin::v2::Backup > ListBackups(google::bigtable::admin::v2::ListBackupsRequest request)
virtual Status DeleteBackup(google::bigtable::admin::v2::DeleteBackupRequest const &request)
virtual future< StatusOr< google::bigtable::admin::v2::Table > > UpdateTable(google::bigtable::admin::v2::UpdateTableRequest const &request)
virtual StreamRange< google::bigtable::admin::v2::Table > ListTables(google::bigtable::admin::v2::ListTablesRequest request)
virtual future< StatusOr< google::bigtable::admin::v2::Backup > > CreateBackup(google::bigtable::admin::v2::CreateBackupRequest const &request)
virtual StatusOr< google::bigtable::admin::v2::Table > ModifyColumnFamilies(google::bigtable::admin::v2::ModifyColumnFamiliesRequest const &request)
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &request)
virtual Options options()
Definition: bigtable_table_admin_connection.h:68
virtual StatusOr< google::bigtable::admin::v2::Table > GetTable(google::bigtable::admin::v2::GetTableRequest const &request)
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &request)
friend friend class future
Definition: bigtable_instance_admin_client.h:35
std::shared_ptr< BigtableTableAdminConnection > MakeBigtableTableAdminConnection(Options options={})
A factory function to construct an object of type BigtableTableAdminConnection.