Offer Bigtable resource classes for the Data API. #9348
Labels
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Milestone
As suggested by @coryan, we should add classes
bigtable::TableResource
andbigtable::Instance
to represent the resource names used by the Data API. This is in a similar vein togoogle::cloud::Project
orgoogle::cloud::spanner::Database
.We have: https://github.com/googleapis/google-cloud-cpp/blob/ee484a2ef86d3e851602430ff72c29899b61141e/google/cloud/bigtable/resource_names.h but we can do better.
At least for the Data API, we want a
Table
constructor like:Table(TableResource resource, Options options = {});
Having just a string is error prone. We cannot guarantee that the user made their string with
TableName(...)
. Our API should make it hard/impossible for the user to give us a bad resource name:The same sorts of classes could be added for
Cluster
orBackup
orAppProfile
. If we want to do that, we can open another issue. (I think we don't want to do it. The Admin API already accepts strings, and it is final.)The text was updated successfully, but these errors were encountered: