diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java index f51cc082c4..94f5cebea8 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java @@ -22,8 +22,10 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; import com.google.bigtable.v2.MutateRowRequest; @@ -36,7 +38,6 @@ import com.google.bigtable.v2.ReadRowsResponse; import com.google.bigtable.v2.SampleRowKeysRequest; import com.google.bigtable.v2.SampleRowKeysResponse; -import com.google.common.collect.ImmutableMap; import com.google.longrunning.stub.GrpcOperationsStub; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -123,6 +124,31 @@ public class GrpcBigtableStub extends BigtableStub { private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; + private static final PathTemplate READ_ROWS_0_PATH_TEMPLATE = + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); + private static final PathTemplate READ_ROWS_1_PATH_TEMPLATE = + PathTemplate.create("{app_profile_id=**}"); + private static final PathTemplate SAMPLE_ROW_KEYS_0_PATH_TEMPLATE = + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); + private static final PathTemplate SAMPLE_ROW_KEYS_1_PATH_TEMPLATE = + PathTemplate.create("{app_profile_id=**}"); + private static final PathTemplate MUTATE_ROW_0_PATH_TEMPLATE = + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); + private static final PathTemplate MUTATE_ROW_1_PATH_TEMPLATE = + PathTemplate.create("{app_profile_id=**}"); + private static final PathTemplate MUTATE_ROWS_0_PATH_TEMPLATE = + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); + private static final PathTemplate MUTATE_ROWS_1_PATH_TEMPLATE = + PathTemplate.create("{app_profile_id=**}"); + private static final PathTemplate CHECK_AND_MUTATE_ROW_0_PATH_TEMPLATE = + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); + private static final PathTemplate CHECK_AND_MUTATE_ROW_1_PATH_TEMPLATE = + PathTemplate.create("{app_profile_id=**}"); + private static final PathTemplate READ_MODIFY_WRITE_ROW_0_PATH_TEMPLATE = + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); + private static final PathTemplate READ_MODIFY_WRITE_ROW_1_PATH_TEMPLATE = + PathTemplate.create("{app_profile_id=**}"); + public static final GrpcBigtableStub create(BigtableStubSettings settings) throws IOException { return new GrpcBigtableStub(settings, ClientContext.create(settings)); } @@ -163,9 +189,11 @@ protected GrpcBigtableStub( .setMethodDescriptor(readRowsMethodDescriptor) .setParamsExtractor( request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("table_name", String.valueOf(request.getTableName())); - return params.build(); + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getTableName(), "table_name", READ_ROWS_0_PATH_TEMPLATE); + builder.add( + request.getAppProfileId(), "app_profile_id", READ_ROWS_1_PATH_TEMPLATE); + return builder.build(); }) .build(); GrpcCallSettings sampleRowKeysTransportSettings = @@ -173,9 +201,12 @@ protected GrpcBigtableStub( .setMethodDescriptor(sampleRowKeysMethodDescriptor) .setParamsExtractor( request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("table_name", String.valueOf(request.getTableName())); - return params.build(); + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getTableName(), "table_name", SAMPLE_ROW_KEYS_0_PATH_TEMPLATE); + builder.add( + request.getAppProfileId(), "app_profile_id", SAMPLE_ROW_KEYS_1_PATH_TEMPLATE); + return builder.build(); }) .build(); GrpcCallSettings mutateRowTransportSettings = @@ -183,9 +214,11 @@ protected GrpcBigtableStub( .setMethodDescriptor(mutateRowMethodDescriptor) .setParamsExtractor( request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("table_name", String.valueOf(request.getTableName())); - return params.build(); + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getTableName(), "table_name", MUTATE_ROW_0_PATH_TEMPLATE); + builder.add( + request.getAppProfileId(), "app_profile_id", MUTATE_ROW_1_PATH_TEMPLATE); + return builder.build(); }) .build(); GrpcCallSettings mutateRowsTransportSettings = @@ -193,9 +226,11 @@ protected GrpcBigtableStub( .setMethodDescriptor(mutateRowsMethodDescriptor) .setParamsExtractor( request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("table_name", String.valueOf(request.getTableName())); - return params.build(); + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getTableName(), "table_name", MUTATE_ROWS_0_PATH_TEMPLATE); + builder.add( + request.getAppProfileId(), "app_profile_id", MUTATE_ROWS_1_PATH_TEMPLATE); + return builder.build(); }) .build(); GrpcCallSettings @@ -204,9 +239,16 @@ protected GrpcBigtableStub( .setMethodDescriptor(checkAndMutateRowMethodDescriptor) .setParamsExtractor( request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("table_name", String.valueOf(request.getTableName())); - return params.build(); + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getTableName(), + "table_name", + CHECK_AND_MUTATE_ROW_0_PATH_TEMPLATE); + builder.add( + request.getAppProfileId(), + "app_profile_id", + CHECK_AND_MUTATE_ROW_1_PATH_TEMPLATE); + return builder.build(); }) .build(); GrpcCallSettings @@ -215,9 +257,16 @@ protected GrpcBigtableStub( .setMethodDescriptor(readModifyWriteRowMethodDescriptor) .setParamsExtractor( request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("table_name", String.valueOf(request.getTableName())); - return params.build(); + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getTableName(), + "table_name", + READ_MODIFY_WRITE_ROW_0_PATH_TEMPLATE); + builder.add( + request.getAppProfileId(), + "app_profile_id", + READ_MODIFY_WRITE_ROW_1_PATH_TEMPLATE); + return builder.build(); }) .build(); diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java index 2faa963ae0..99d019cacb 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java @@ -100,113 +100,126 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle.bigtable.v2\032\034google/api/annotations." + "proto\032\027google/api/client.proto\032\037google/a" + "pi/field_behavior.proto\032\031google/api/reso" - + "urce.proto\032\035google/bigtable/v2/data.prot" - + "o\032\036google/protobuf/wrappers.proto\032\027googl" - + "e/rpc/status.proto\"\326\001\n\017ReadRowsRequest\022>" - + "\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmi" - + "n.googleapis.com/Table\022\026\n\016app_profile_id" - + "\030\005 \001(\t\022(\n\004rows\030\002 \001(\0132\032.google.bigtable.v" - + "2.RowSet\022-\n\006filter\030\003 \001(\0132\035.google.bigtab" - + "le.v2.RowFilter\022\022\n\nrows_limit\030\004 \001(\003\"\370\002\n\020" - + "ReadRowsResponse\022>\n\006chunks\030\001 \003(\0132..googl" - + "e.bigtable.v2.ReadRowsResponse.CellChunk" - + "\022\034\n\024last_scanned_row_key\030\002 \001(\014\032\205\002\n\tCellC" - + "hunk\022\017\n\007row_key\030\001 \001(\014\0221\n\013family_name\030\002 \001" - + "(\0132\034.google.protobuf.StringValue\022.\n\tqual" - + "ifier\030\003 \001(\0132\033.google.protobuf.BytesValue" - + "\022\030\n\020timestamp_micros\030\004 \001(\003\022\016\n\006labels\030\005 \003" - + "(\t\022\r\n\005value\030\006 \001(\014\022\022\n\nvalue_size\030\007 \001(\005\022\023\n" - + "\treset_row\030\010 \001(\010H\000\022\024\n\ncommit_row\030\t \001(\010H\000" - + "B\014\n\nrow_status\"n\n\024SampleRowKeysRequest\022>" - + "\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmi" - + "n.googleapis.com/Table\022\026\n\016app_profile_id" - + "\030\002 \001(\t\">\n\025SampleRowKeysResponse\022\017\n\007row_k" - + "ey\030\001 \001(\014\022\024\n\014offset_bytes\030\002 \001(\003\"\266\001\n\020Mutat" - + "eRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n" - + "\"bigtableadmin.googleapis.com/Table\022\026\n\016a" - + "pp_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A" - + "\002\0224\n\tmutations\030\003 \003(\0132\034.google.bigtable.v" - + "2.MutationB\003\340A\002\"\023\n\021MutateRowResponse\"\376\001\n" - + "\021MutateRowsRequest\022>\n\ntable_name\030\001 \001(\tB*" - + "\340A\002\372A$\n\"bigtableadmin.googleapis.com/Tab" - + "le\022\026\n\016app_profile_id\030\003 \001(\t\022A\n\007entries\030\002 " - + "\003(\0132+.google.bigtable.v2.MutateRowsReque" - + "st.EntryB\003\340A\002\032N\n\005Entry\022\017\n\007row_key\030\001 \001(\014\022" - + "4\n\tmutations\030\002 \003(\0132\034.google.bigtable.v2." - + "MutationB\003\340A\002\"\217\001\n\022MutateRowsResponse\022=\n\007" - + "entries\030\001 \003(\0132,.google.bigtable.v2.Mutat" - + "eRowsResponse.Entry\032:\n\005Entry\022\r\n\005index\030\001 " - + "\001(\003\022\"\n\006status\030\002 \001(\0132\022.google.rpc.Status\"" - + "\256\002\n\030CheckAndMutateRowRequest\022>\n\ntable_na" - + "me\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleap" - + "is.com/Table\022\026\n\016app_profile_id\030\007 \001(\t\022\024\n\007" - + "row_key\030\002 \001(\014B\003\340A\002\0227\n\020predicate_filter\030\006" - + " \001(\0132\035.google.bigtable.v2.RowFilter\0224\n\016t" - + "rue_mutations\030\004 \003(\0132\034.google.bigtable.v2" - + ".Mutation\0225\n\017false_mutations\030\005 \003(\0132\034.goo" - + "gle.bigtable.v2.Mutation\"6\n\031CheckAndMuta" - + "teRowResponse\022\031\n\021predicate_matched\030\001 \001(\010" - + "\"\306\001\n\031ReadModifyWriteRowRequest\022>\n\ntable_" - + "name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.google" - + "apis.com/Table\022\026\n\016app_profile_id\030\004 \001(\t\022\024" - + "\n\007row_key\030\002 \001(\014B\003\340A\002\022;\n\005rules\030\003 \003(\0132\'.go" - + "ogle.bigtable.v2.ReadModifyWriteRuleB\003\340A" - + "\002\"B\n\032ReadModifyWriteRowResponse\022$\n\003row\030\001" - + " \001(\0132\027.google.bigtable.v2.Row2\304\016\n\010Bigtab" - + "le\022\306\001\n\010ReadRows\022#.google.bigtable.v2.Rea" - + "dRowsRequest\032$.google.bigtable.v2.ReadRo" - + "wsResponse\"m\202\323\344\223\002>\"9/v2/{table_name=proj" - + "ects/*/instances/*/tables/*}:readRows:\001*" - + "\332A\ntable_name\332A\031table_name,app_profile_i" - + "d0\001\022\327\001\n\rSampleRowKeys\022(.google.bigtable." - + "v2.SampleRowKeysRequest\032).google.bigtabl" - + "e.v2.SampleRowKeysResponse\"o\202\323\344\223\002@\022>/v2/" - + "{table_name=projects/*/instances/*/table" - + "s/*}:sampleRowKeys\332A\ntable_name\332A\031table_" - + "name,app_profile_id0\001\022\355\001\n\tMutateRow\022$.go" - + "ogle.bigtable.v2.MutateRowRequest\032%.goog" - + "le.bigtable.v2.MutateRowResponse\"\222\001\202\323\344\223\002" - + "?\":/v2/{table_name=projects/*/instances/" - + "*/tables/*}:mutateRow:\001*\332A\034table_name,ro" + + "urce.proto\032\030google/api/routing.proto\032\035go" + + "ogle/bigtable/v2/data.proto\032\036google/prot" + + "obuf/wrappers.proto\032\027google/rpc/status.p" + + "roto\"\326\001\n\017ReadRowsRequest\022>\n\ntable_name\030\001" + + " \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.c" + + "om/Table\022\026\n\016app_profile_id\030\005 \001(\t\022(\n\004rows" + + "\030\002 \001(\0132\032.google.bigtable.v2.RowSet\022-\n\006fi" + + "lter\030\003 \001(\0132\035.google.bigtable.v2.RowFilte" + + "r\022\022\n\nrows_limit\030\004 \001(\003\"\370\002\n\020ReadRowsRespon" + + "se\022>\n\006chunks\030\001 \003(\0132..google.bigtable.v2." + + "ReadRowsResponse.CellChunk\022\034\n\024last_scann" + + "ed_row_key\030\002 \001(\014\032\205\002\n\tCellChunk\022\017\n\007row_ke" + + "y\030\001 \001(\014\0221\n\013family_name\030\002 \001(\0132\034.google.pr" + + "otobuf.StringValue\022.\n\tqualifier\030\003 \001(\0132\033." + + "google.protobuf.BytesValue\022\030\n\020timestamp_" + + "micros\030\004 \001(\003\022\016\n\006labels\030\005 \003(\t\022\r\n\005value\030\006 " + + "\001(\014\022\022\n\nvalue_size\030\007 \001(\005\022\023\n\treset_row\030\010 \001" + + "(\010H\000\022\024\n\ncommit_row\030\t \001(\010H\000B\014\n\nrow_status" + + "\"n\n\024SampleRowKeysRequest\022>\n\ntable_name\030\001" + + " \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.c" + + "om/Table\022\026\n\016app_profile_id\030\002 \001(\t\">\n\025Samp" + + "leRowKeysResponse\022\017\n\007row_key\030\001 \001(\014\022\024\n\014of" + + "fset_bytes\030\002 \001(\003\"\266\001\n\020MutateRowRequest\022>\n" + + "\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin" + + ".googleapis.com/Table\022\026\n\016app_profile_id\030" + + "\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A\002\0224\n\tmutations" + + "\030\003 \003(\0132\034.google.bigtable.v2.MutationB\003\340A" + + "\002\"\023\n\021MutateRowResponse\"\376\001\n\021MutateRowsReq" + + "uest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtab" + + "leadmin.googleapis.com/Table\022\026\n\016app_prof" + + "ile_id\030\003 \001(\t\022A\n\007entries\030\002 \003(\0132+.google.b" + + "igtable.v2.MutateRowsRequest.EntryB\003\340A\002\032" + + "N\n\005Entry\022\017\n\007row_key\030\001 \001(\014\0224\n\tmutations\030\002" + + " \003(\0132\034.google.bigtable.v2.MutationB\003\340A\002\"" + + "\217\001\n\022MutateRowsResponse\022=\n\007entries\030\001 \003(\0132" + + ",.google.bigtable.v2.MutateRowsResponse." + + "Entry\032:\n\005Entry\022\r\n\005index\030\001 \001(\003\022\"\n\006status\030" + + "\002 \001(\0132\022.google.rpc.Status\"\256\002\n\030CheckAndMu" + + "tateRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372" + + "A$\n\"bigtableadmin.googleapis.com/Table\022\026" + + "\n\016app_profile_id\030\007 \001(\t\022\024\n\007row_key\030\002 \001(\014B" + + "\003\340A\002\0227\n\020predicate_filter\030\006 \001(\0132\035.google." + + "bigtable.v2.RowFilter\0224\n\016true_mutations\030" + + "\004 \003(\0132\034.google.bigtable.v2.Mutation\0225\n\017f" + + "alse_mutations\030\005 \003(\0132\034.google.bigtable.v" + + "2.Mutation\"6\n\031CheckAndMutateRowResponse\022" + + "\031\n\021predicate_matched\030\001 \001(\010\"\306\001\n\031ReadModif" + + "yWriteRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A" + + "\002\372A$\n\"bigtableadmin.googleapis.com/Table" + + "\022\026\n\016app_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(" + + "\014B\003\340A\002\022;\n\005rules\030\003 \003(\0132\'.google.bigtable." + + "v2.ReadModifyWriteRuleB\003\340A\002\"B\n\032ReadModif" + + "yWriteRowResponse\022$\n\003row\030\001 \001(\0132\027.google." + + "bigtable.v2.Row2\277\022\n\010Bigtable\022\233\002\n\010ReadRow" + + "s\022#.google.bigtable.v2.ReadRowsRequest\032$" + + ".google.bigtable.v2.ReadRowsResponse\"\301\001\202" + + "\323\344\223\002>\"9/v2/{table_name=projects/*/instan" + + "ces/*/tables/*}:readRows:\001*\212\323\344\223\002N\022:\n\ntab" + + "le_name\022,{table_name=projects/*/instance" + + "s/*/tables/*}\022\020\n\016app_profile_id\332A\ntable_" + + "name\332A\031table_name,app_profile_id0\001\022\254\002\n\rS" + + "ampleRowKeys\022(.google.bigtable.v2.Sample" + + "RowKeysRequest\032).google.bigtable.v2.Samp" + + "leRowKeysResponse\"\303\001\202\323\344\223\002@\022>/v2/{table_n" + + "ame=projects/*/instances/*/tables/*}:sam" + + "pleRowKeys\212\323\344\223\002N\022:\n\ntable_name\022,{table_n" + + "ame=projects/*/instances/*/tables/*}\022\020\n\016" + + "app_profile_id\332A\ntable_name\332A\031table_name" + + ",app_profile_id0\001\022\301\002\n\tMutateRow\022$.google" + + ".bigtable.v2.MutateRowRequest\032%.google.b" + + "igtable.v2.MutateRowResponse\"\346\001\202\323\344\223\002?\":/" + + "v2/{table_name=projects/*/instances/*/ta" + + "bles/*}:mutateRow:\001*\212\323\344\223\002N\022:\n\ntable_name" + + "\022,{table_name=projects/*/instances/*/tab" + + "les/*}\022\020\n\016app_profile_id\332A\034table_name,ro" + "w_key,mutations\332A+table_name,row_key,mut" - + "ations,app_profile_id\022\336\001\n\nMutateRows\022%.g" + + "ations,app_profile_id\022\263\002\n\nMutateRows\022%.g" + "oogle.bigtable.v2.MutateRowsRequest\032&.go" - + "ogle.bigtable.v2.MutateRowsResponse\"\177\202\323\344" - + "\223\002@\";/v2/{table_name=projects/*/instance" - + "s/*/tables/*}:mutateRows:\001*\332A\022table_name" - + ",entries\332A!table_name,entries,app_profil" - + "e_id0\001\022\331\002\n\021CheckAndMutateRow\022,.google.bi" - + "gtable.v2.CheckAndMutateRowRequest\032-.goo" - + "gle.bigtable.v2.CheckAndMutateRowRespons" - + "e\"\346\001\202\323\344\223\002G\"B/v2/{table_name=projects/*/i" - + "nstances/*/tables/*}:checkAndMutateRow:\001" - + "*\332ABtable_name,row_key,predicate_filter," - + "true_mutations,false_mutations\332AQtable_n" - + "ame,row_key,predicate_filter,true_mutati" - + "ons,false_mutations,app_profile_id\022\211\002\n\022R" - + "eadModifyWriteRow\022-.google.bigtable.v2.R" - + "eadModifyWriteRowRequest\032..google.bigtab" - + "le.v2.ReadModifyWriteRowResponse\"\223\001\202\323\344\223\002" - + "H\"C/v2/{table_name=projects/*/instances/" - + "*/tables/*}:readModifyWriteRow:\001*\332A\030tabl" - + "e_name,row_key,rules\332A\'table_name,row_ke" - + "y,rules,app_profile_id\032\333\002\312A\027bigtable.goo" - + "gleapis.com\322A\275\002https://www.googleapis.co" - + "m/auth/bigtable.data,https://www.googlea" - + "pis.com/auth/bigtable.data.readonly,http" - + "s://www.googleapis.com/auth/cloud-bigtab" - + "le.data,https://www.googleapis.com/auth/" - + "cloud-bigtable.data.readonly,https://www" - + ".googleapis.com/auth/cloud-platform,http" - + "s://www.googleapis.com/auth/cloud-platfo" - + "rm.read-onlyB\230\002\n\026com.google.bigtable.v2B" - + "\rBigtableProtoP\001Z:google.golang.org/genp" - + "roto/googleapis/bigtable/v2;bigtable\252\002\030G" - + "oogle.Cloud.Bigtable.V2\312\002\030Google\\Cloud\\B" - + "igtable\\V2\352\002\033Google::Cloud::Bigtable::V2" - + "\352A\\\n\"bigtableadmin.googleapis.com/Table\022" - + "6projects/{project}/instances/{instance}" - + "/tables/{table}b\006proto3" + + "ogle.bigtable.v2.MutateRowsResponse\"\323\001\202\323" + + "\344\223\002@\";/v2/{table_name=projects/*/instanc" + + "es/*/tables/*}:mutateRows:\001*\212\323\344\223\002N\022:\n\nta" + + "ble_name\022,{table_name=projects/*/instanc" + + "es/*/tables/*}\022\020\n\016app_profile_id\332A\022table" + + "_name,entries\332A!table_name,entries,app_p" + + "rofile_id0\001\022\255\003\n\021CheckAndMutateRow\022,.goog" + + "le.bigtable.v2.CheckAndMutateRowRequest\032" + + "-.google.bigtable.v2.CheckAndMutateRowRe" + + "sponse\"\272\002\202\323\344\223\002G\"B/v2/{table_name=project" + + "s/*/instances/*/tables/*}:checkAndMutate" + + "Row:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=" + + "projects/*/instances/*/tables/*}\022\020\n\016app_" + + "profile_id\332ABtable_name,row_key,predicat" + + "e_filter,true_mutations,false_mutations\332" + + "AQtable_name,row_key,predicate_filter,tr" + + "ue_mutations,false_mutations,app_profile" + + "_id\022\335\002\n\022ReadModifyWriteRow\022-.google.bigt" + + "able.v2.ReadModifyWriteRowRequest\032..goog" + + "le.bigtable.v2.ReadModifyWriteRowRespons" + + "e\"\347\001\202\323\344\223\002H\"C/v2/{table_name=projects/*/i" + + "nstances/*/tables/*}:readModifyWriteRow:" + + "\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=proj" + + "ects/*/instances/*/tables/*}\022\020\n\016app_prof" + + "ile_id\332A\030table_name,row_key,rules\332A\'tabl" + + "e_name,row_key,rules,app_profile_id\032\333\002\312A" + + "\027bigtable.googleapis.com\322A\275\002https://www." + + "googleapis.com/auth/bigtable.data,https:" + + "//www.googleapis.com/auth/bigtable.data." + + "readonly,https://www.googleapis.com/auth" + + "/cloud-bigtable.data,https://www.googlea" + + "pis.com/auth/cloud-bigtable.data.readonl" + + "y,https://www.googleapis.com/auth/cloud-" + + "platform,https://www.googleapis.com/auth" + + "/cloud-platform.read-onlyB\230\002\n\026com.google" + + ".bigtable.v2B\rBigtableProtoP\001Z:google.go" + + "lang.org/genproto/googleapis/bigtable/v2" + + ";bigtable\252\002\030Google.Cloud.Bigtable.V2\312\002\030G" + + "oogle\\Cloud\\Bigtable\\V2\352\002\033Google::Cloud:" + + ":Bigtable::V2\352A\\\n\"bigtableadmin.googleap" + + "is.com/Table\0226projects/{project}/instanc" + + "es/{instance}/tables/{table}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -216,6 +229,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.api.RoutingProto.getDescriptor(), com.google.bigtable.v2.DataProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), @@ -361,12 +375,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.api.RoutingProto.routing); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.api.RoutingProto.getDescriptor(); com.google.bigtable.v2.DataProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java index 5b1b58b6a0..9ecd26e8c3 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java @@ -267,7 +267,8 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { * * *
-   * The row keys and/or ranges to read. If not specified, reads from all rows.
+   * The row keys and/or ranges to read sequentially. If not specified, reads
+   * from all rows.
    * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -282,7 +283,8 @@ public boolean hasRows() { * * *
-   * The row keys and/or ranges to read. If not specified, reads from all rows.
+   * The row keys and/or ranges to read sequentially. If not specified, reads
+   * from all rows.
    * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -297,7 +299,8 @@ public com.google.bigtable.v2.RowSet getRows() { * * *
-   * The row keys and/or ranges to read. If not specified, reads from all rows.
+   * The row keys and/or ranges to read sequentially. If not specified, reads
+   * from all rows.
    * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -362,7 +365,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { * * *
-   * The read will terminate after committing to N rows' worth of results. The
+   * The read will stop after committing to N rows' worth of results. The
    * default (zero) is to return all results.
    * 
* @@ -1024,7 +1027,8 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1038,7 +1042,8 @@ public boolean hasRows() { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1056,7 +1061,8 @@ public com.google.bigtable.v2.RowSet getRows() { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1078,7 +1084,8 @@ public Builder setRows(com.google.bigtable.v2.RowSet value) { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1097,7 +1104,8 @@ public Builder setRows(com.google.bigtable.v2.RowSet.Builder builderForValue) { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1120,7 +1128,8 @@ public Builder mergeRows(com.google.bigtable.v2.RowSet value) { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1140,7 +1149,8 @@ public Builder clearRows() { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1154,7 +1164,8 @@ public com.google.bigtable.v2.RowSet.Builder getRowsBuilder() { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1170,7 +1181,8 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { * * *
-     * The row keys and/or ranges to read. If not specified, reads from all rows.
+     * The row keys and/or ranges to read sequentially. If not specified, reads
+     * from all rows.
      * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -1385,7 +1397,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { * * *
-     * The read will terminate after committing to N rows' worth of results. The
+     * The read will stop after committing to N rows' worth of results. The
      * default (zero) is to return all results.
      * 
* @@ -1401,7 +1413,7 @@ public long getRowsLimit() { * * *
-     * The read will terminate after committing to N rows' worth of results. The
+     * The read will stop after committing to N rows' worth of results. The
      * default (zero) is to return all results.
      * 
* @@ -1420,7 +1432,7 @@ public Builder setRowsLimit(long value) { * * *
-     * The read will terminate after committing to N rows' worth of results. The
+     * The read will stop after committing to N rows' worth of results. The
      * default (zero) is to return all results.
      * 
* diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java index a38045db61..9455f46c5c 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java @@ -87,7 +87,8 @@ public interface ReadRowsRequestOrBuilder * * *
-   * The row keys and/or ranges to read. If not specified, reads from all rows.
+   * The row keys and/or ranges to read sequentially. If not specified, reads
+   * from all rows.
    * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -99,7 +100,8 @@ public interface ReadRowsRequestOrBuilder * * *
-   * The row keys and/or ranges to read. If not specified, reads from all rows.
+   * The row keys and/or ranges to read sequentially. If not specified, reads
+   * from all rows.
    * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -111,7 +113,8 @@ public interface ReadRowsRequestOrBuilder * * *
-   * The row keys and/or ranges to read. If not specified, reads from all rows.
+   * The row keys and/or ranges to read sequentially. If not specified, reads
+   * from all rows.
    * 
* * .google.bigtable.v2.RowSet rows = 2; @@ -160,7 +163,7 @@ public interface ReadRowsRequestOrBuilder * * *
-   * The read will terminate after committing to N rows' worth of results. The
+   * The read will stop after committing to N rows' worth of results. The
    * default (zero) is to return all results.
    * 
* diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java index d66bc4ee94..e23c74e087 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java @@ -48,7 +48,7 @@ * * Chains and interleaves are described in more detail in the * RowFilter.Chain and RowFilter.Interleave documentation. * The total serialized size of a RowFilter message must not - * exceed 4096 bytes, and RowFilters may not be nested within each other + * exceed 20480 bytes, and RowFilters may not be nested within each other * (in Chains or Interleaves) to a depth of more than 20. * * @@ -6014,7 +6014,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Chains and interleaves are described in more detail in the * RowFilter.Chain and RowFilter.Interleave documentation. * The total serialized size of a RowFilter message must not - * exceed 4096 bytes, and RowFilters may not be nested within each other + * exceed 20480 bytes, and RowFilters may not be nested within each other * (in Chains or Interleaves) to a depth of more than 20. * * diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto index 94a8428429..17b145665a 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/api/routing.proto"; import "google/bigtable/v2/data.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; @@ -57,6 +58,15 @@ service Bigtable { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readRows" body: "*" }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { + field: "app_profile_id" + } + }; option (google.api.method_signature) = "table_name"; option (google.api.method_signature) = "table_name,app_profile_id"; } @@ -69,6 +79,15 @@ service Bigtable { option (google.api.http) = { get: "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys" }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { + field: "app_profile_id" + } + }; option (google.api.method_signature) = "table_name"; option (google.api.method_signature) = "table_name,app_profile_id"; } @@ -80,6 +99,15 @@ service Bigtable { post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow" body: "*" }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { + field: "app_profile_id" + } + }; option (google.api.method_signature) = "table_name,row_key,mutations"; option (google.api.method_signature) = "table_name,row_key,mutations,app_profile_id"; } @@ -92,6 +120,15 @@ service Bigtable { post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows" body: "*" }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { + field: "app_profile_id" + } + }; option (google.api.method_signature) = "table_name,entries"; option (google.api.method_signature) = "table_name,entries,app_profile_id"; } @@ -102,6 +139,15 @@ service Bigtable { post: "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow" body: "*" }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { + field: "app_profile_id" + } + }; option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations"; option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id"; } @@ -116,6 +162,15 @@ service Bigtable { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow" body: "*" }; + option (google.api.routing) = { + routing_parameters { + field: "table_name" + path_template: "{table_name=projects/*/instances/*/tables/*}" + } + routing_parameters { + field: "app_profile_id" + } + }; option (google.api.method_signature) = "table_name,row_key,rules"; option (google.api.method_signature) = "table_name,row_key,rules,app_profile_id"; } @@ -137,14 +192,15 @@ message ReadRowsRequest { // "default" application profile will be used. string app_profile_id = 5; - // The row keys and/or ranges to read. If not specified, reads from all rows. + // The row keys and/or ranges to read sequentially. If not specified, reads + // from all rows. RowSet rows = 2; // The filter to apply to the contents of the specified row(s). If unset, // reads the entirety of each row. RowFilter filter = 3; - // The read will terminate after committing to N rows' worth of results. The + // The read will stop after committing to N rows' worth of results. The // default (zero) is to return all results. int64 rows_limit = 4; } diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto index 2cc916454b..7193ee7531 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -210,7 +209,7 @@ message ValueRange { // RowFilter.Chain and RowFilter.Interleave documentation. // // The total serialized size of a RowFilter message must not -// exceed 4096 bytes, and RowFilters may not be nested within each other +// exceed 20480 bytes, and RowFilters may not be nested within each other // (in Chains or Interleaves) to a depth of more than 20. message RowFilter { // A RowFilter which sends rows through several RowFilters in sequence.