Skip to content

Create fromProtobuf utility method in existing models #297

@rahulKQL

Description

@rahulKQL

**Please describe requested feature? **
User should be able to transform protobuf object into bigtable client's model object. Similar to:

/**
* Wraps the protobuf {@link ReadRowsRequest}.
*
* <p>WARNING: Please note that the project id & instance id in the table name will be overwritten
* by the configuration in the BigtableDataClient.
*/
public static Query fromProto(@Nonnull ReadRowsRequest request) {
Preconditions.checkArgument(request != null, "ReadRowsRequest must not be null");
Query query = new Query(NameUtil.extractTableIdFromTableName(request.getTableName()));
query.builder = request.toBuilder();
return query;
}

Additional context
Discussed offline in the last meeting.

Metadata

Metadata

Assignees

Labels

api: bigtableIssues related to the googleapis/java-bigtable API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions