15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CLIENT_H
16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CLIENT_H
18 #include "google/cloud/bigtable/client_options.h"
19 #include "google/cloud/bigtable/completion_queue.h"
20 #include "google/cloud/bigtable/row.h"
21 #include "google/cloud/bigtable/version.h"
22 #include <google/bigtable/v2/bigtable.grpc.pb.h>
28 namespace bigtable_internal {
30 class LegacyAsyncRowReader;
31 class LegacyRowReader;
38 class AsyncRetryBulkApply;
39 class LegacyAsyncRowSampler;
41 class LoggingDataClient;
83 virtual std::shared_ptr<grpc::Channel> Channel() = 0;
115 friend class internal::AsyncRetryBulkApply;
116 friend class internal::LegacyAsyncRowSampler;
117 friend class internal::BulkMutator;
118 friend class bigtable_internal::LegacyRowReader;
119 friend class bigtable_internal::LegacyAsyncRowReader;
120 friend class internal::LoggingDataClient;
125 grpc::ClientContext* context,
126 google::bigtable::v2::MutateRowRequest
const& request,
127 google::bigtable::v2::MutateRowResponse* response) = 0;
128 virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface<
129 google::bigtable::v2::MutateRowResponse>>
131 google::bigtable::v2::MutateRowRequest
const& request,
132 grpc::CompletionQueue* cq) = 0;
134 grpc::ClientContext* context,
135 google::bigtable::v2::CheckAndMutateRowRequest
const& request,
136 google::bigtable::v2::CheckAndMutateRowResponse* response) = 0;
137 virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface<
138 google::bigtable::v2::CheckAndMutateRowResponse>>
140 grpc::ClientContext* context,
141 google::bigtable::v2::CheckAndMutateRowRequest
const& request,
142 grpc::CompletionQueue* cq) = 0;
144 grpc::ClientContext* context,
145 google::bigtable::v2::ReadModifyWriteRowRequest
const& request,
146 google::bigtable::v2::ReadModifyWriteRowResponse* response) = 0;
147 virtual std::unique_ptr<grpc::ClientAsyncResponseReaderInterface<
148 google::bigtable::v2::ReadModifyWriteRowResponse>>
150 grpc::ClientContext* context,
151 google::bigtable::v2::ReadModifyWriteRowRequest
const& request,
152 grpc::CompletionQueue* cq) = 0;
153 virtual std::unique_ptr<
154 grpc::ClientReaderInterface<
google::bigtable::v2::ReadRowsResponse>>
156 google::bigtable::v2::ReadRowsRequest
const& request) = 0;
157 virtual std::unique_ptr<
158 grpc::ClientAsyncReaderInterface<
google::bigtable::v2::ReadRowsResponse>>
160 google::bigtable::v2::ReadRowsRequest
const& request,
161 grpc::CompletionQueue* cq,
void* tag) = 0;
162 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
163 google::bigtable::v2::ReadRowsResponse>>
165 google::bigtable::v2::ReadRowsRequest
const& request,
166 grpc::CompletionQueue* cq) = 0;
167 virtual std::unique_ptr<
168 grpc::ClientReaderInterface<
google::bigtable::v2::SampleRowKeysResponse>>
170 google::bigtable::v2::SampleRowKeysRequest
const& request) = 0;
171 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
172 google::bigtable::v2::SampleRowKeysResponse>>
174 google::bigtable::v2::SampleRowKeysRequest
const& request,
175 grpc::CompletionQueue* cq,
void* tag) = 0;
176 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
177 google::bigtable::v2::SampleRowKeysResponse>>
179 grpc::ClientContext* context,
180 google::bigtable::v2::SampleRowKeysRequest
const& request,
181 grpc::CompletionQueue* cq);
182 virtual std::unique_ptr<
183 grpc::ClientReaderInterface<
google::bigtable::v2::MutateRowsResponse>>
185 google::bigtable::v2::MutateRowsRequest
const& request) = 0;
186 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
187 google::bigtable::v2::MutateRowsResponse>>
189 google::bigtable::v2::MutateRowsRequest
const& request,
190 grpc::CompletionQueue* cq,
void* tag) = 0;
191 virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface<
192 google::bigtable::v2::MutateRowsResponse>>
194 google::bigtable::v2::MutateRowsRequest
const& request,
195 grpc::CompletionQueue* cq) = 0;
201 std::string instance_id,
210 GOOGLE_CLOUD_CPP_DEPRECATED(
"use `MakeDataClient` instead")
212 std::string instance_id,
222 return "projects/" + client->
project_id() +
"/instances/" +