Note: close() needs to be called on the DatastoreAdminClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * - *
The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *
Method | + *Description | + *Method Variants | + *
---|---|---|
ExportEntities | + *Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ImportEntities | + *Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateIndex | + *Creates the specified index. A newly created index's initial state is `CREATING`. On completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`. If the index already exists, the call will return an `ALREADY_EXISTS` status. + * During index creation, the process could result in an error, in which case the index will move to the `ERROR` state. The process can be recovered by fixing the data that caused the error, removing the index with [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then re-creating the index with [create] [google.datastore.admin.v1.DatastoreAdmin.CreateIndex]. + * Indexes with a single property cannot be created. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteIndex | + *Deletes an existing index. An index can only be deleted if it is in a `READY` or `ERROR` state. On successful execution of the request, the index will be in a `DELETING` [state][google.datastore.admin.v1.Index.State]. And on completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed. + * During index deletion, the process could result in an error, in which case the index will move to the `ERROR` state. The process can be recovered by fixing the data that caused the error, followed by calling [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetIndex | + *Gets an index. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListIndexes | + *Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code.
*
diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
index 08d7b7179..6de58e7f0 100644
--- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
+++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
@@ -258,6 +258,12 @@ public DatastoreAdminStub createStub() throws IOException {
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}
+ /** Returns the default service name. */
+ @Override
+ public String getServiceName() {
+ return "datastore";
+ }
+
/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
return InstantiatingExecutorProvider.newBuilder();
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java
index 7c8741735..b87fdafea 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java
@@ -131,146 +131,152 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "outing.proto\032,google/datastore/v1/aggreg"
+ "ation_result.proto\032 google/datastore/v1/"
+ "entity.proto\032\037google/datastore/v1/query."
- + "proto\032\037google/protobuf/timestamp.proto\"\244"
- + "\001\n\rLookupRequest\022\030\n\nproject_id\030\010 \001(\tB\004\342A"
- + "\001\002\022\023\n\013database_id\030\t \001(\t\0226\n\014read_options\030"
- + "\001 \001(\0132 .google.datastore.v1.ReadOptions\022"
- + ",\n\004keys\030\003 \003(\0132\030.google.datastore.v1.KeyB"
- + "\004\342A\001\002\"\346\001\n\016LookupResponse\0220\n\005found\030\001 \003(\0132"
- + "!.google.datastore.v1.EntityResult\0222\n\007mi"
- + "ssing\030\002 \003(\0132!.google.datastore.v1.Entity"
- + "Result\022*\n\010deferred\030\003 \003(\0132\030.google.datast"
- + "ore.v1.Key\022\023\n\013transaction\030\005 \001(\014\022-\n\tread_"
- + "time\030\007 \001(\0132\032.google.protobuf.Timestamp\"\237"
- + "\002\n\017RunQueryRequest\022\030\n\nproject_id\030\010 \001(\tB\004"
- + "\342A\001\002\022\023\n\013database_id\030\t \001(\t\0226\n\014partition_i"
- + "d\030\002 \001(\0132 .google.datastore.v1.PartitionI"
- + "d\0226\n\014read_options\030\001 \001(\0132 .google.datasto"
- + "re.v1.ReadOptions\022+\n\005query\030\003 \001(\0132\032.googl"
- + "e.datastore.v1.QueryH\000\0222\n\tgql_query\030\007 \001("
- + "\0132\035.google.datastore.v1.GqlQueryH\000B\014\n\nqu"
- + "ery_type\"\210\001\n\020RunQueryResponse\0224\n\005batch\030\001"
- + " \001(\0132%.google.datastore.v1.QueryResultBa"
- + "tch\022)\n\005query\030\002 \001(\0132\032.google.datastore.v1"
- + ".Query\022\023\n\013transaction\030\005 \001(\014\"\301\002\n\032RunAggre"
- + "gationQueryRequest\022\030\n\nproject_id\030\010 \001(\tB\004"
- + "\342A\001\002\022\023\n\013database_id\030\t \001(\t\0226\n\014partition_i"
- + "d\030\002 \001(\0132 .google.datastore.v1.PartitionI"
- + "d\0226\n\014read_options\030\001 \001(\0132 .google.datasto"
- + "re.v1.ReadOptions\022B\n\021aggregation_query\030\003"
- + " \001(\0132%.google.datastore.v1.AggregationQu"
- + "eryH\000\0222\n\tgql_query\030\007 \001(\0132\035.google.datast"
- + "ore.v1.GqlQueryH\000B\014\n\nquery_type\"\244\001\n\033RunA"
- + "ggregationQueryResponse\022:\n\005batch\030\001 \001(\0132+"
- + ".google.datastore.v1.AggregationResultBa"
- + "tch\0224\n\005query\030\002 \001(\0132%.google.datastore.v1"
- + ".AggregationQuery\022\023\n\013transaction\030\005 \001(\014\"\216"
- + "\001\n\027BeginTransactionRequest\022\030\n\nproject_id"
- + "\030\010 \001(\tB\004\342A\001\002\022\023\n\013database_id\030\t \001(\t\022D\n\023tra"
- + "nsaction_options\030\n \001(\0132\'.google.datastor"
- + "e.v1.TransactionOptions\"/\n\030BeginTransact"
- + "ionResponse\022\023\n\013transaction\030\001 \001(\014\"[\n\017Roll"
- + "backRequest\022\030\n\nproject_id\030\010 \001(\tB\004\342A\001\002\022\023\n"
- + "\013database_id\030\t \001(\t\022\031\n\013transaction\030\001 \001(\014B"
- + "\004\342A\001\002\"\022\n\020RollbackResponse\"\351\002\n\rCommitRequ"
+ + "proto\032\'google/datastore/v1/query_profile"
+ + ".proto\032\037google/protobuf/timestamp.proto\""
+ + "\244\001\n\rLookupRequest\022\030\n\nproject_id\030\010 \001(\tB\004\342"
+ + "A\001\002\022\023\n\013database_id\030\t \001(\t\0226\n\014read_options"
+ + "\030\001 \001(\0132 .google.datastore.v1.ReadOptions"
+ + "\022,\n\004keys\030\003 \003(\0132\030.google.datastore.v1.Key"
+ + "B\004\342A\001\002\"\346\001\n\016LookupResponse\0220\n\005found\030\001 \003(\013"
+ + "2!.google.datastore.v1.EntityResult\0222\n\007m"
+ + "issing\030\002 \003(\0132!.google.datastore.v1.Entit"
+ + "yResult\022*\n\010deferred\030\003 \003(\0132\030.google.datas"
+ + "tore.v1.Key\022\023\n\013transaction\030\005 \001(\014\022-\n\tread"
+ + "_time\030\007 \001(\0132\032.google.protobuf.Timestamp\""
+ + "\323\002\n\017RunQueryRequest\022\030\n\nproject_id\030\010 \001(\tB"
+ + "\004\342A\001\002\022\023\n\013database_id\030\t \001(\t\0226\n\014partition_"
+ + "id\030\002 \001(\0132 .google.datastore.v1.Partition"
+ + "Id\0226\n\014read_options\030\001 \001(\0132 .google.datast"
+ + "ore.v1.ReadOptions\022+\n\005query\030\003 \001(\0132\032.goog"
+ + "le.datastore.v1.QueryH\000\0222\n\tgql_query\030\007 \001"
+ + "(\0132\035.google.datastore.v1.GqlQueryH\000\0222\n\004m"
+ + "ode\030\013 \001(\0162\036.google.datastore.v1.QueryMod"
+ + "eB\004\342A\001\001B\014\n\nquery_type\"\274\001\n\020RunQueryRespon"
+ + "se\0224\n\005batch\030\001 \001(\0132%.google.datastore.v1."
+ + "QueryResultBatch\022)\n\005query\030\002 \001(\0132\032.google"
+ + ".datastore.v1.Query\022\023\n\013transaction\030\005 \001(\014"
+ + "\0222\n\005stats\030\006 \001(\0132#.google.datastore.v1.Re"
+ + "sultSetStats\"\365\002\n\032RunAggregationQueryRequ"
+ "est\022\030\n\nproject_id\030\010 \001(\tB\004\342A\001\002\022\023\n\013databas"
- + "e_id\030\t \001(\t\0225\n\004mode\030\005 \001(\0162\'.google.datast"
- + "ore.v1.CommitRequest.Mode\022\025\n\013transaction"
- + "\030\001 \001(\014H\000\022I\n\026single_use_transaction\030\n \001(\013"
- + "2\'.google.datastore.v1.TransactionOption"
- + "sH\000\0220\n\tmutations\030\006 \003(\0132\035.google.datastor"
- + "e.v1.Mutation\"F\n\004Mode\022\024\n\020MODE_UNSPECIFIE"
- + "D\020\000\022\021\n\rTRANSACTIONAL\020\001\022\025\n\021NON_TRANSACTIO"
- + "NAL\020\002B\026\n\024transaction_selector\"\227\001\n\016Commit"
- + "Response\022=\n\020mutation_results\030\003 \003(\0132#.goo"
- + "gle.datastore.v1.MutationResult\022\025\n\rindex"
- + "_updates\030\004 \001(\005\022/\n\013commit_time\030\010 \001(\0132\032.go"
- + "ogle.protobuf.Timestamp\"q\n\022AllocateIdsRe"
- + "quest\022\030\n\nproject_id\030\010 \001(\tB\004\342A\001\002\022\023\n\013datab"
- + "ase_id\030\t \001(\t\022,\n\004keys\030\001 \003(\0132\030.google.data"
- + "store.v1.KeyB\004\342A\001\002\"=\n\023AllocateIdsRespons"
- + "e\022&\n\004keys\030\001 \003(\0132\030.google.datastore.v1.Ke"
- + "y\"p\n\021ReserveIdsRequest\022\030\n\nproject_id\030\010 \001"
- + "(\tB\004\342A\001\002\022\023\n\013database_id\030\t \001(\t\022,\n\004keys\030\001 "
- + "\003(\0132\030.google.datastore.v1.KeyB\004\342A\001\002\"\024\n\022R"
- + "eserveIdsResponse\"\272\002\n\010Mutation\022-\n\006insert"
- + "\030\004 \001(\0132\033.google.datastore.v1.EntityH\000\022-\n"
- + "\006update\030\005 \001(\0132\033.google.datastore.v1.Enti"
- + "tyH\000\022-\n\006upsert\030\006 \001(\0132\033.google.datastore."
- + "v1.EntityH\000\022*\n\006delete\030\007 \001(\0132\030.google.dat"
- + "astore.v1.KeyH\000\022\026\n\014base_version\030\010 \001(\003H\001\022"
- + "1\n\013update_time\030\013 \001(\0132\032.google.protobuf.T"
- + "imestampH\001B\013\n\toperationB\035\n\033conflict_dete"
- + "ction_strategy\"\305\001\n\016MutationResult\022%\n\003key"
- + "\030\003 \001(\0132\030.google.datastore.v1.Key\022\017\n\007vers"
- + "ion\030\004 \001(\003\022/\n\013create_time\030\007 \001(\0132\032.google."
- + "protobuf.Timestamp\022/\n\013update_time\030\006 \001(\0132"
- + "\032.google.protobuf.Timestamp\022\031\n\021conflict_"
- + "detected\030\005 \001(\010\"\312\002\n\013ReadOptions\022L\n\020read_c"
- + "onsistency\030\001 \001(\01620.google.datastore.v1.R"
- + "eadOptions.ReadConsistencyH\000\022\025\n\013transact"
- + "ion\030\002 \001(\014H\000\022B\n\017new_transaction\030\003 \001(\0132\'.g"
- + "oogle.datastore.v1.TransactionOptionsH\000\022"
- + "/\n\tread_time\030\004 \001(\0132\032.google.protobuf.Tim"
- + "estampH\000\"M\n\017ReadConsistency\022 \n\034READ_CONS"
- + "ISTENCY_UNSPECIFIED\020\000\022\n\n\006STRONG\020\001\022\014\n\010EVE"
- + "NTUAL\020\002B\022\n\020consistency_type\"\222\002\n\022Transact"
- + "ionOptions\022G\n\nread_write\030\001 \001(\01321.google."
- + "datastore.v1.TransactionOptions.ReadWrit"
- + "eH\000\022E\n\tread_only\030\002 \001(\01320.google.datastor"
- + "e.v1.TransactionOptions.ReadOnlyH\000\032)\n\tRe"
- + "adWrite\022\034\n\024previous_transaction\030\001 \001(\014\0329\n"
- + "\010ReadOnly\022-\n\tread_time\030\001 \001(\0132\032.google.pr"
- + "otobuf.TimestampB\006\n\004mode2\341\r\n\tDatastore\022\300"
- + "\001\n\006Lookup\022\".google.datastore.v1.LookupRe"
- + "quest\032#.google.datastore.v1.LookupRespon"
- + "se\"m\332A\034project_id,read_options,keys\202\323\344\223\002"
- + "%\" /v1/projects/{project_id}:lookup:\001*\212\323"
- + "\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id\022\251\001\n\010Ru"
- + "nQuery\022$.google.datastore.v1.RunQueryReq"
- + "uest\032%.google.datastore.v1.RunQueryRespo"
- + "nse\"P\202\323\344\223\002\'\"\"/v1/projects/{project_id}:r"
- + "unQuery:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013databa"
- + "se_id\022\325\001\n\023RunAggregationQuery\022/.google.d"
- + "atastore.v1.RunAggregationQueryRequest\0320"
+ + "e_id\030\t \001(\t\0226\n\014partition_id\030\002 \001(\0132 .googl"
+ + "e.datastore.v1.PartitionId\0226\n\014read_optio"
+ + "ns\030\001 \001(\0132 .google.datastore.v1.ReadOptio"
+ + "ns\022B\n\021aggregation_query\030\003 \001(\0132%.google.d"
+ + "atastore.v1.AggregationQueryH\000\0222\n\tgql_qu"
+ + "ery\030\007 \001(\0132\035.google.datastore.v1.GqlQuery"
+ + "H\000\0222\n\004mode\030\n \001(\0162\036.google.datastore.v1.Q"
+ + "ueryModeB\004\342A\001\001B\014\n\nquery_type\"\330\001\n\033RunAggr"
+ + "egationQueryResponse\022:\n\005batch\030\001 \001(\0132+.go"
+ + "ogle.datastore.v1.AggregationResultBatch"
+ + "\0224\n\005query\030\002 \001(\0132%.google.datastore.v1.Ag"
+ + "gregationQuery\022\023\n\013transaction\030\005 \001(\014\0222\n\005s"
+ + "tats\030\006 \001(\0132#.google.datastore.v1.ResultS"
+ + "etStats\"\216\001\n\027BeginTransactionRequest\022\030\n\np"
+ + "roject_id\030\010 \001(\tB\004\342A\001\002\022\023\n\013database_id\030\t \001"
+ + "(\t\022D\n\023transaction_options\030\n \001(\0132\'.google"
+ + ".datastore.v1.TransactionOptions\"/\n\030Begi"
+ + "nTransactionResponse\022\023\n\013transaction\030\001 \001("
+ + "\014\"[\n\017RollbackRequest\022\030\n\nproject_id\030\010 \001(\t"
+ + "B\004\342A\001\002\022\023\n\013database_id\030\t \001(\t\022\031\n\013transacti"
+ + "on\030\001 \001(\014B\004\342A\001\002\"\022\n\020RollbackResponse\"\351\002\n\rC"
+ + "ommitRequest\022\030\n\nproject_id\030\010 \001(\tB\004\342A\001\002\022\023"
+ + "\n\013database_id\030\t \001(\t\0225\n\004mode\030\005 \001(\0162\'.goog"
+ + "le.datastore.v1.CommitRequest.Mode\022\025\n\013tr"
+ + "ansaction\030\001 \001(\014H\000\022I\n\026single_use_transact"
+ + "ion\030\n \001(\0132\'.google.datastore.v1.Transact"
+ + "ionOptionsH\000\0220\n\tmutations\030\006 \003(\0132\035.google"
+ + ".datastore.v1.Mutation\"F\n\004Mode\022\024\n\020MODE_U"
+ + "NSPECIFIED\020\000\022\021\n\rTRANSACTIONAL\020\001\022\025\n\021NON_T"
+ + "RANSACTIONAL\020\002B\026\n\024transaction_selector\"\227"
+ + "\001\n\016CommitResponse\022=\n\020mutation_results\030\003 "
+ + "\003(\0132#.google.datastore.v1.MutationResult"
+ + "\022\025\n\rindex_updates\030\004 \001(\005\022/\n\013commit_time\030\010"
+ + " \001(\0132\032.google.protobuf.Timestamp\"q\n\022Allo"
+ + "cateIdsRequest\022\030\n\nproject_id\030\010 \001(\tB\004\342A\001\002"
+ + "\022\023\n\013database_id\030\t \001(\t\022,\n\004keys\030\001 \003(\0132\030.go"
+ + "ogle.datastore.v1.KeyB\004\342A\001\002\"=\n\023AllocateI"
+ + "dsResponse\022&\n\004keys\030\001 \003(\0132\030.google.datast"
+ + "ore.v1.Key\"p\n\021ReserveIdsRequest\022\030\n\nproje"
+ + "ct_id\030\010 \001(\tB\004\342A\001\002\022\023\n\013database_id\030\t \001(\t\022,"
+ + "\n\004keys\030\001 \003(\0132\030.google.datastore.v1.KeyB\004"
+ + "\342A\001\002\"\024\n\022ReserveIdsResponse\"\272\002\n\010Mutation\022"
+ + "-\n\006insert\030\004 \001(\0132\033.google.datastore.v1.En"
+ + "tityH\000\022-\n\006update\030\005 \001(\0132\033.google.datastor"
+ + "e.v1.EntityH\000\022-\n\006upsert\030\006 \001(\0132\033.google.d"
+ + "atastore.v1.EntityH\000\022*\n\006delete\030\007 \001(\0132\030.g"
+ + "oogle.datastore.v1.KeyH\000\022\026\n\014base_version"
+ + "\030\010 \001(\003H\001\0221\n\013update_time\030\013 \001(\0132\032.google.p"
+ + "rotobuf.TimestampH\001B\013\n\toperationB\035\n\033conf"
+ + "lict_detection_strategy\"\305\001\n\016MutationResu"
+ + "lt\022%\n\003key\030\003 \001(\0132\030.google.datastore.v1.Ke"
+ + "y\022\017\n\007version\030\004 \001(\003\022/\n\013create_time\030\007 \001(\0132"
+ + "\032.google.protobuf.Timestamp\022/\n\013update_ti"
+ + "me\030\006 \001(\0132\032.google.protobuf.Timestamp\022\031\n\021"
+ + "conflict_detected\030\005 \001(\010\"\312\002\n\013ReadOptions\022"
+ + "L\n\020read_consistency\030\001 \001(\01620.google.datas"
+ + "tore.v1.ReadOptions.ReadConsistencyH\000\022\025\n"
+ + "\013transaction\030\002 \001(\014H\000\022B\n\017new_transaction\030"
+ + "\003 \001(\0132\'.google.datastore.v1.TransactionO"
+ + "ptionsH\000\022/\n\tread_time\030\004 \001(\0132\032.google.pro"
+ + "tobuf.TimestampH\000\"M\n\017ReadConsistency\022 \n\034"
+ + "READ_CONSISTENCY_UNSPECIFIED\020\000\022\n\n\006STRONG"
+ + "\020\001\022\014\n\010EVENTUAL\020\002B\022\n\020consistency_type\"\222\002\n"
+ + "\022TransactionOptions\022G\n\nread_write\030\001 \001(\0132"
+ + "1.google.datastore.v1.TransactionOptions"
+ + ".ReadWriteH\000\022E\n\tread_only\030\002 \001(\01320.google"
+ + ".datastore.v1.TransactionOptions.ReadOnl"
+ + "yH\000\032)\n\tReadWrite\022\034\n\024previous_transaction"
+ + "\030\001 \001(\014\0329\n\010ReadOnly\022-\n\tread_time\030\001 \001(\0132\032."
+ + "google.protobuf.TimestampB\006\n\004mode2\341\r\n\tDa"
+ + "tastore\022\300\001\n\006Lookup\022\".google.datastore.v1"
+ + ".LookupRequest\032#.google.datastore.v1.Loo"
+ + "kupResponse\"m\332A\034project_id,read_options,"
+ + "keys\202\323\344\223\002%\" /v1/projects/{project_id}:lo"
+ + "okup:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_"
+ + "id\022\251\001\n\010RunQuery\022$.google.datastore.v1.Ru"
+ + "nQueryRequest\032%.google.datastore.v1.RunQ"
+ + "ueryResponse\"P\202\323\344\223\002\'\"\"/v1/projects/{proj"
+ + "ect_id}:runQuery:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022"
+ + "\r\n\013database_id\022\325\001\n\023RunAggregationQuery\022/"
+ ".google.datastore.v1.RunAggregationQuery"
- + "Response\"[\202\323\344\223\0022\"-/v1/projects/{project_"
- + "id}:runAggregationQuery:\001*\212\323\344\223\002\035\022\014\n\nproj"
- + "ect_id\022\r\n\013database_id\022\326\001\n\020BeginTransacti"
- + "on\022,.google.datastore.v1.BeginTransactio"
- + "nRequest\032-.google.datastore.v1.BeginTran"
- + "sactionResponse\"e\332A\nproject_id\202\323\344\223\002/\"*/v"
- + "1/projects/{project_id}:beginTransaction"
- + ":\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id\022\346"
- + "\001\n\006Commit\022\".google.datastore.v1.CommitRe"
- + "quest\032#.google.datastore.v1.CommitRespon"
- + "se\"\222\001\332A%project_id,mode,transaction,muta"
- + "tions\332A\031project_id,mode,mutations\202\323\344\223\002%\""
- + " /v1/projects/{project_id}:commit:\001*\212\323\344\223"
- + "\002\035\022\014\n\nproject_id\022\r\n\013database_id\022\302\001\n\010Roll"
- + "back\022$.google.datastore.v1.RollbackReque"
- + "st\032%.google.datastore.v1.RollbackRespons"
- + "e\"i\332A\026project_id,transaction\202\323\344\223\002\'\"\"/v1/"
- + "projects/{project_id}:rollback:\001*\212\323\344\223\002\035\022"
- + "\014\n\nproject_id\022\r\n\013database_id\022\307\001\n\013Allocat"
- + "eIds\022\'.google.datastore.v1.AllocateIdsRe"
- + "quest\032(.google.datastore.v1.AllocateIdsR"
- + "esponse\"e\332A\017project_id,keys\202\323\344\223\002*\"%/v1/p"
- + "rojects/{project_id}:allocateIds:\001*\212\323\344\223\002"
- + "\035\022\014\n\nproject_id\022\r\n\013database_id\022\303\001\n\nReser"
- + "veIds\022&.google.datastore.v1.ReserveIdsRe"
- + "quest\032\'.google.datastore.v1.ReserveIdsRe"
- + "sponse\"d\332A\017project_id,keys\202\323\344\223\002)\"$/v1/pr"
- + "ojects/{project_id}:reserveIds:\001*\212\323\344\223\002\035\022"
- + "\014\n\nproject_id\022\r\n\013database_id\032v\312A\030datasto"
- + "re.googleapis.com\322AXhttps://www.googleap"
- + "is.com/auth/cloud-platform,https://www.g"
- + "oogleapis.com/auth/datastoreB\300\001\n\027com.goo"
- + "gle.datastore.v1B\016DatastoreProtoP\001Z ExportEntities Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. Request object method variants only take one parameter, a request object, which must be constructed before the call. exportEntitiesAsync(ExportEntitiesRequest request)
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. exportEntitiesAsync(String projectId, Map<String, String> labels, EntityFilter entityFilter, String outputUrlPrefix)
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. exportEntitiesOperationCallable()
+ * exportEntitiesCallable()
* ImportEntities Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore. Request object method variants only take one parameter, a request object, which must be constructed before the call. importEntitiesAsync(ImportEntitiesRequest request)
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. importEntitiesAsync(String projectId, Map<String, String> labels, String inputUrl, EntityFilter entityFilter)
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. importEntitiesOperationCallable()
+ * importEntitiesCallable()
* CreateIndex Creates the specified index. A newly created index's initial state is `CREATING`. On completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`. If the index already exists, the call will return an `ALREADY_EXISTS` status.
* During index creation, the process could result in an error, in which case the index will move to the `ERROR` state. The process can be recovered by fixing the data that caused the error, removing the index with [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then re-creating the index with [create] [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].
* Indexes with a single property cannot be created. Request object method variants only take one parameter, a request object, which must be constructed before the call. createIndexAsync(CreateIndexRequest request)
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createIndexOperationCallable()
+ * createIndexCallable()
* DeleteIndex Deletes an existing index. An index can only be deleted if it is in a `READY` or `ERROR` state. On successful execution of the request, the index will be in a `DELETING` [state][google.datastore.admin.v1.Index.State]. And on completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed.
* During index deletion, the process could result in an error, in which case the index will move to the `ERROR` state. The process can be recovered by fixing the data that caused the error, followed by calling [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteIndexAsync(DeleteIndexRequest request)
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteIndexOperationCallable()
+ * deleteIndexCallable()
* GetIndex Gets an index. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIndex(GetIndexRequest request)
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIndexCallable()
* ListIndexes Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results. Request object method variants only take one parameter, a request object, which must be constructed before the call. listIndexes(ListIndexesRequest request)
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listIndexesPagedCallable()
+ * listIndexesCallable()
*
+ * The default mode. Only the query results are returned.
+ *
+ *
+ * NORMAL = 0;
+ */
+ NORMAL(0),
+ /**
+ *
+ *
+ *
+ * This mode returns only the query plan, without any results or execution
+ * statistics information.
+ *
+ *
+ * PLAN = 1;
+ */
+ PLAN(1),
+ /**
+ *
+ *
+ *
+ * This mode returns both the query plan and the execution statistics along
+ * with the results.
+ *
+ *
+ * PROFILE = 2;
+ */
+ PROFILE(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * The default mode. Only the query results are returned.
+ *
+ *
+ * NORMAL = 0;
+ */
+ public static final int NORMAL_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * This mode returns only the query plan, without any results or execution
+ * statistics information.
+ *
+ *
+ * PLAN = 1;
+ */
+ public static final int PLAN_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * This mode returns both the query plan and the execution statistics along
+ * with the results.
+ *
+ *
+ * PROFILE = 2;
+ */
+ public static final int PROFILE_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static QueryMode valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static QueryMode forNumber(int value) {
+ switch (value) {
+ case 0:
+ return NORMAL;
+ case 1:
+ return PLAN;
+ case 2:
+ return PROFILE;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Plan for the query.
+ *
+ *
+ * Protobuf type {@code google.datastore.v1.QueryPlan}
+ */
+public final class QueryPlan extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.datastore.v1.QueryPlan)
+ QueryPlanOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use QueryPlan.newBuilder() to construct.
+ private QueryPlan(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private QueryPlan() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new QueryPlan();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.datastore.v1.QueryProfileProto
+ .internal_static_google_datastore_v1_QueryPlan_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.datastore.v1.QueryProfileProto
+ .internal_static_google_datastore_v1_QueryPlan_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.datastore.v1.QueryPlan.class,
+ com.google.datastore.v1.QueryPlan.Builder.class);
+ }
+
+ public static final int PLAN_INFO_FIELD_NUMBER = 1;
+ private com.google.protobuf.Struct planInfo_;
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ *
+ * @return Whether the planInfo field is set.
+ */
+ @java.lang.Override
+ public boolean hasPlanInfo() {
+ return planInfo_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ *
+ * @return The planInfo.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getPlanInfo() {
+ return planInfo_ == null ? com.google.protobuf.Struct.getDefaultInstance() : planInfo_;
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getPlanInfoOrBuilder() {
+ return planInfo_ == null ? com.google.protobuf.Struct.getDefaultInstance() : planInfo_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (planInfo_ != null) {
+ output.writeMessage(1, getPlanInfo());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (planInfo_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPlanInfo());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.datastore.v1.QueryPlan)) {
+ return super.equals(obj);
+ }
+ com.google.datastore.v1.QueryPlan other = (com.google.datastore.v1.QueryPlan) obj;
+
+ if (hasPlanInfo() != other.hasPlanInfo()) return false;
+ if (hasPlanInfo()) {
+ if (!getPlanInfo().equals(other.getPlanInfo())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasPlanInfo()) {
+ hash = (37 * hash) + PLAN_INFO_FIELD_NUMBER;
+ hash = (53 * hash) + getPlanInfo().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.QueryPlan parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.datastore.v1.QueryPlan prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * Protobuf type {@code google.datastore.v1.QueryPlan}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ *
+ * @return Whether the planInfo field is set.
+ */
+ public boolean hasPlanInfo() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ *
+ * @return The planInfo.
+ */
+ public com.google.protobuf.Struct getPlanInfo() {
+ if (planInfoBuilder_ == null) {
+ return planInfo_ == null ? com.google.protobuf.Struct.getDefaultInstance() : planInfo_;
+ } else {
+ return planInfoBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ public Builder setPlanInfo(com.google.protobuf.Struct value) {
+ if (planInfoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ planInfo_ = value;
+ } else {
+ planInfoBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ public Builder setPlanInfo(com.google.protobuf.Struct.Builder builderForValue) {
+ if (planInfoBuilder_ == null) {
+ planInfo_ = builderForValue.build();
+ } else {
+ planInfoBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ public Builder mergePlanInfo(com.google.protobuf.Struct value) {
+ if (planInfoBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && planInfo_ != null
+ && planInfo_ != com.google.protobuf.Struct.getDefaultInstance()) {
+ getPlanInfoBuilder().mergeFrom(value);
+ } else {
+ planInfo_ = value;
+ }
+ } else {
+ planInfoBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ public Builder clearPlanInfo() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ planInfo_ = null;
+ if (planInfoBuilder_ != null) {
+ planInfoBuilder_.dispose();
+ planInfoBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ public com.google.protobuf.Struct.Builder getPlanInfoBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getPlanInfoFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ public com.google.protobuf.StructOrBuilder getPlanInfoOrBuilder() {
+ if (planInfoBuilder_ != null) {
+ return planInfoBuilder_.getMessageOrBuilder();
+ } else {
+ return planInfo_ == null ? com.google.protobuf.Struct.getDefaultInstance() : planInfo_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ getPlanInfoFieldBuilder() {
+ if (planInfoBuilder_ == null) {
+ planInfoBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>(
+ getPlanInfo(), getParentForChildren(), isClean());
+ planInfo_ = null;
+ }
+ return planInfoBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.datastore.v1.QueryPlan)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.datastore.v1.QueryPlan)
+ private static final com.google.datastore.v1.QueryPlan DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.datastore.v1.QueryPlan();
+ }
+
+ public static com.google.datastore.v1.QueryPlan getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ *
+ * @return Whether the planInfo field is set.
+ */
+ boolean hasPlanInfo();
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ *
+ * @return The planInfo.
+ */
+ com.google.protobuf.Struct getPlanInfo();
+ /**
+ *
+ *
+ *
+ * Planning phase information for the query. It will include:
+ *
+ * {
+ * "indexes_used": [
+ * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ * ]
+ * }
+ *
+ *
+ * .google.protobuf.Struct plan_info = 1;
+ */
+ com.google.protobuf.StructOrBuilder getPlanInfoOrBuilder();
+}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryProfileProto.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryProfileProto.java
new file mode 100644
index 000000000..cf0be47e6
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryProfileProto.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/datastore/v1/query_profile.proto
+
+package com.google.datastore.v1;
+
+public final class QueryProfileProto {
+ private QueryProfileProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_datastore_v1_QueryPlan_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_datastore_v1_QueryPlan_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_datastore_v1_ResultSetStats_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_datastore_v1_ResultSetStats_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\'google/datastore/v1/query_profile.prot"
+ + "o\022\023google.datastore.v1\032\034google/protobuf/"
+ + "struct.proto\"7\n\tQueryPlan\022*\n\tplan_info\030\001"
+ + " \001(\0132\027.google.protobuf.Struct\"r\n\016ResultS"
+ + "etStats\0222\n\nquery_plan\030\001 \001(\0132\036.google.dat"
+ + "astore.v1.QueryPlan\022,\n\013query_stats\030\002 \001(\013"
+ + "2\027.google.protobuf.Struct*.\n\tQueryMode\022\n"
+ + "\n\006NORMAL\020\000\022\010\n\004PLAN\020\001\022\013\n\007PROFILE\020\002B\303\001\n\027co"
+ + "m.google.datastore.v1B\021QueryProfileProto"
+ + "P\001Z
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ *
+ * @return Whether the queryPlan field is set.
+ */
+ @java.lang.Override
+ public boolean hasQueryPlan() {
+ return queryPlan_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ *
+ * @return The queryPlan.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.QueryPlan getQueryPlan() {
+ return queryPlan_ == null ? com.google.datastore.v1.QueryPlan.getDefaultInstance() : queryPlan_;
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.QueryPlanOrBuilder getQueryPlanOrBuilder() {
+ return queryPlan_ == null ? com.google.datastore.v1.QueryPlan.getDefaultInstance() : queryPlan_;
+ }
+
+ public static final int QUERY_STATS_FIELD_NUMBER = 2;
+ private com.google.protobuf.Struct queryStats_;
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ *
+ * @return Whether the queryStats field is set.
+ */
+ @java.lang.Override
+ public boolean hasQueryStats() {
+ return queryStats_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ *
+ * @return The queryStats.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getQueryStats() {
+ return queryStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : queryStats_;
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getQueryStatsOrBuilder() {
+ return queryStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : queryStats_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (queryPlan_ != null) {
+ output.writeMessage(1, getQueryPlan());
+ }
+ if (queryStats_ != null) {
+ output.writeMessage(2, getQueryStats());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (queryPlan_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getQueryPlan());
+ }
+ if (queryStats_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQueryStats());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.datastore.v1.ResultSetStats)) {
+ return super.equals(obj);
+ }
+ com.google.datastore.v1.ResultSetStats other = (com.google.datastore.v1.ResultSetStats) obj;
+
+ if (hasQueryPlan() != other.hasQueryPlan()) return false;
+ if (hasQueryPlan()) {
+ if (!getQueryPlan().equals(other.getQueryPlan())) return false;
+ }
+ if (hasQueryStats() != other.hasQueryStats()) return false;
+ if (hasQueryStats()) {
+ if (!getQueryStats().equals(other.getQueryStats())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasQueryPlan()) {
+ hash = (37 * hash) + QUERY_PLAN_FIELD_NUMBER;
+ hash = (53 * hash) + getQueryPlan().hashCode();
+ }
+ if (hasQueryStats()) {
+ hash = (37 * hash) + QUERY_STATS_FIELD_NUMBER;
+ hash = (53 * hash) + getQueryStats().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ResultSetStats parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.datastore.v1.ResultSetStats prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Planning and execution statistics for the query.
+ *
+ *
+ * Protobuf type {@code google.datastore.v1.ResultSetStats}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ *
+ * @return Whether the queryPlan field is set.
+ */
+ public boolean hasQueryPlan() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ *
+ * @return The queryPlan.
+ */
+ public com.google.datastore.v1.QueryPlan getQueryPlan() {
+ if (queryPlanBuilder_ == null) {
+ return queryPlan_ == null
+ ? com.google.datastore.v1.QueryPlan.getDefaultInstance()
+ : queryPlan_;
+ } else {
+ return queryPlanBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ public Builder setQueryPlan(com.google.datastore.v1.QueryPlan value) {
+ if (queryPlanBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ queryPlan_ = value;
+ } else {
+ queryPlanBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ public Builder setQueryPlan(com.google.datastore.v1.QueryPlan.Builder builderForValue) {
+ if (queryPlanBuilder_ == null) {
+ queryPlan_ = builderForValue.build();
+ } else {
+ queryPlanBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ public Builder mergeQueryPlan(com.google.datastore.v1.QueryPlan value) {
+ if (queryPlanBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && queryPlan_ != null
+ && queryPlan_ != com.google.datastore.v1.QueryPlan.getDefaultInstance()) {
+ getQueryPlanBuilder().mergeFrom(value);
+ } else {
+ queryPlan_ = value;
+ }
+ } else {
+ queryPlanBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ public Builder clearQueryPlan() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ queryPlan_ = null;
+ if (queryPlanBuilder_ != null) {
+ queryPlanBuilder_.dispose();
+ queryPlanBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ public com.google.datastore.v1.QueryPlan.Builder getQueryPlanBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getQueryPlanFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ public com.google.datastore.v1.QueryPlanOrBuilder getQueryPlanOrBuilder() {
+ if (queryPlanBuilder_ != null) {
+ return queryPlanBuilder_.getMessageOrBuilder();
+ } else {
+ return queryPlan_ == null
+ ? com.google.datastore.v1.QueryPlan.getDefaultInstance()
+ : queryPlan_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.QueryPlan,
+ com.google.datastore.v1.QueryPlan.Builder,
+ com.google.datastore.v1.QueryPlanOrBuilder>
+ getQueryPlanFieldBuilder() {
+ if (queryPlanBuilder_ == null) {
+ queryPlanBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.QueryPlan,
+ com.google.datastore.v1.QueryPlan.Builder,
+ com.google.datastore.v1.QueryPlanOrBuilder>(
+ getQueryPlan(), getParentForChildren(), isClean());
+ queryPlan_ = null;
+ }
+ return queryPlanBuilder_;
+ }
+
+ private com.google.protobuf.Struct queryStats_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ queryStatsBuilder_;
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ *
+ * @return Whether the queryStats field is set.
+ */
+ public boolean hasQueryStats() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ *
+ * @return The queryStats.
+ */
+ public com.google.protobuf.Struct getQueryStats() {
+ if (queryStatsBuilder_ == null) {
+ return queryStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : queryStats_;
+ } else {
+ return queryStatsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ public Builder setQueryStats(com.google.protobuf.Struct value) {
+ if (queryStatsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ queryStats_ = value;
+ } else {
+ queryStatsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ public Builder setQueryStats(com.google.protobuf.Struct.Builder builderForValue) {
+ if (queryStatsBuilder_ == null) {
+ queryStats_ = builderForValue.build();
+ } else {
+ queryStatsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ public Builder mergeQueryStats(com.google.protobuf.Struct value) {
+ if (queryStatsBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && queryStats_ != null
+ && queryStats_ != com.google.protobuf.Struct.getDefaultInstance()) {
+ getQueryStatsBuilder().mergeFrom(value);
+ } else {
+ queryStats_ = value;
+ }
+ } else {
+ queryStatsBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ public Builder clearQueryStats() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ queryStats_ = null;
+ if (queryStatsBuilder_ != null) {
+ queryStatsBuilder_.dispose();
+ queryStatsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ public com.google.protobuf.Struct.Builder getQueryStatsBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getQueryStatsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ public com.google.protobuf.StructOrBuilder getQueryStatsOrBuilder() {
+ if (queryStatsBuilder_ != null) {
+ return queryStatsBuilder_.getMessageOrBuilder();
+ } else {
+ return queryStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : queryStats_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ getQueryStatsFieldBuilder() {
+ if (queryStatsBuilder_ == null) {
+ queryStatsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>(
+ getQueryStats(), getParentForChildren(), isClean());
+ queryStats_ = null;
+ }
+ return queryStatsBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.datastore.v1.ResultSetStats)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.datastore.v1.ResultSetStats)
+ private static final com.google.datastore.v1.ResultSetStats DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.datastore.v1.ResultSetStats();
+ }
+
+ public static com.google.datastore.v1.ResultSetStats getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ *
+ * @return Whether the queryPlan field is set.
+ */
+ boolean hasQueryPlan();
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ *
+ * @return The queryPlan.
+ */
+ com.google.datastore.v1.QueryPlan getQueryPlan();
+ /**
+ *
+ *
+ *
+ * Plan for the query.
+ *
+ *
+ * .google.datastore.v1.QueryPlan query_plan = 1;
+ */
+ com.google.datastore.v1.QueryPlanOrBuilder getQueryPlanOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ *
+ * @return Whether the queryStats field is set.
+ */
+ boolean hasQueryStats();
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ *
+ * @return The queryStats.
+ */
+ com.google.protobuf.Struct getQueryStats();
+ /**
+ *
+ *
+ *
+ * Aggregated statistics from the execution of the query.
+ *
+ * This will only be present when the request specifies `PROFILE` mode.
+ * For example, a query will return the statistics including:
+ *
+ * {
+ * "results_returned": "20",
+ * "documents_scanned": "20",
+ * "indexes_entries_scanned": "10050",
+ * "total_execution_time": "100.7 msecs"
+ * }
+ *
+ *
+ * .google.protobuf.Struct query_stats = 2;
+ */
+ com.google.protobuf.StructOrBuilder getQueryStatsOrBuilder();
+}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryRequest.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryRequest.java
index 434acb2c3..12e9bf63c 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryRequest.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryRequest.java
@@ -41,6 +41,7 @@ private RunAggregationQueryRequest(com.google.protobuf.GeneratedMessageV3.Builde
private RunAggregationQueryRequest() {
projectId_ = "";
databaseId_ = "";
+ mode_ = 0;
}
@java.lang.Override
@@ -432,6 +433,46 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return com.google.datastore.v1.GqlQuery.getDefaultInstance();
}
+ public static final int MODE_FIELD_NUMBER = 10;
+ private int mode_ = 0;
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for mode.
+ */
+ @java.lang.Override
+ public int getModeValue() {
+ return mode_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The mode.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.QueryMode getMode() {
+ com.google.datastore.v1.QueryMode result = com.google.datastore.v1.QueryMode.forNumber(mode_);
+ return result == null ? com.google.datastore.v1.QueryMode.UNRECOGNIZED : result;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -464,6 +505,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, databaseId_);
}
+ if (mode_ != com.google.datastore.v1.QueryMode.NORMAL.getNumber()) {
+ output.writeEnum(10, mode_);
+ }
getUnknownFields().writeTo(output);
}
@@ -495,6 +539,9 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, databaseId_);
}
+ if (mode_ != com.google.datastore.v1.QueryMode.NORMAL.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, mode_);
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -521,6 +568,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasReadOptions()) {
if (!getReadOptions().equals(other.getReadOptions())) return false;
}
+ if (mode_ != other.mode_) return false;
if (!getQueryTypeCase().equals(other.getQueryTypeCase())) return false;
switch (queryTypeCase_) {
case 3:
@@ -555,6 +603,8 @@ public int hashCode() {
hash = (37 * hash) + READ_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getReadOptions().hashCode();
}
+ hash = (37 * hash) + MODE_FIELD_NUMBER;
+ hash = (53 * hash) + mode_;
switch (queryTypeCase_) {
case 3:
hash = (37 * hash) + AGGREGATION_QUERY_FIELD_NUMBER;
@@ -725,6 +775,7 @@ public Builder clear() {
if (gqlQueryBuilder_ != null) {
gqlQueryBuilder_.clear();
}
+ mode_ = 0;
queryTypeCase_ = 0;
queryType_ = null;
return this;
@@ -778,6 +829,9 @@ private void buildPartial0(com.google.datastore.v1.RunAggregationQueryRequest re
result.readOptions_ =
readOptionsBuilder_ == null ? readOptions_ : readOptionsBuilder_.build();
}
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.mode_ = mode_;
+ }
}
private void buildPartialOneofs(com.google.datastore.v1.RunAggregationQueryRequest result) {
@@ -853,6 +907,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunAggregationQueryRequest othe
if (other.hasReadOptions()) {
mergeReadOptions(other.getReadOptions());
}
+ if (other.mode_ != 0) {
+ setModeValue(other.getModeValue());
+ }
switch (other.getQueryTypeCase()) {
case AGGREGATION_QUERY:
{
@@ -932,6 +989,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000002;
break;
} // case 74
+ case 80:
+ {
+ mode_ = input.readEnum();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 80
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -2000,6 +2063,110 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return gqlQueryBuilder_;
}
+ private int mode_ = 0;
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for mode.
+ */
+ @java.lang.Override
+ public int getModeValue() {
+ return mode_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The enum numeric value on the wire for mode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModeValue(int value) {
+ mode_ = value;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The mode.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.QueryMode getMode() {
+ com.google.datastore.v1.QueryMode result = com.google.datastore.v1.QueryMode.forNumber(mode_);
+ return result == null ? com.google.datastore.v1.QueryMode.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The mode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMode(com.google.datastore.v1.QueryMode value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000040;
+ mode_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMode() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ mode_ = 0;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryRequestOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryRequestOrBuilder.java
index cd3bd4435..6d86f2903 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryRequestOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryRequestOrBuilder.java
@@ -228,5 +228,36 @@ public interface RunAggregationQueryRequestOrBuilder
*/
com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder();
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for mode.
+ */
+ int getModeValue();
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 10 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The mode.
+ */
+ com.google.datastore.v1.QueryMode getMode();
+
com.google.datastore.v1.RunAggregationQueryRequest.QueryTypeCase getQueryTypeCase();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryResponse.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryResponse.java
index cb94cb231..328afcfdf 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryResponse.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryResponse.java
@@ -183,6 +183,61 @@ public com.google.protobuf.ByteString getTransaction() {
return transaction_;
}
+ public static final int STATS_FIELD_NUMBER = 6;
+ private com.google.datastore.v1.ResultSetStats stats_;
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return Whether the stats field is set.
+ */
+ @java.lang.Override
+ public boolean hasStats() {
+ return stats_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return The stats.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ResultSetStats getStats() {
+ return stats_ == null ? com.google.datastore.v1.ResultSetStats.getDefaultInstance() : stats_;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ResultSetStatsOrBuilder getStatsOrBuilder() {
+ return stats_ == null ? com.google.datastore.v1.ResultSetStats.getDefaultInstance() : stats_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -206,6 +261,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!transaction_.isEmpty()) {
output.writeBytes(5, transaction_);
}
+ if (stats_ != null) {
+ output.writeMessage(6, getStats());
+ }
getUnknownFields().writeTo(output);
}
@@ -224,6 +282,9 @@ public int getSerializedSize() {
if (!transaction_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, transaction_);
}
+ if (stats_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStats());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -249,6 +310,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getQuery().equals(other.getQuery())) return false;
}
if (!getTransaction().equals(other.getTransaction())) return false;
+ if (hasStats() != other.hasStats()) return false;
+ if (hasStats()) {
+ if (!getStats().equals(other.getStats())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -270,6 +335,10 @@ public int hashCode() {
}
hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
hash = (53 * hash) + getTransaction().hashCode();
+ if (hasStats()) {
+ hash = (37 * hash) + STATS_FIELD_NUMBER;
+ hash = (53 * hash) + getStats().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -421,6 +490,11 @@ public Builder clear() {
queryBuilder_ = null;
}
transaction_ = com.google.protobuf.ByteString.EMPTY;
+ stats_ = null;
+ if (statsBuilder_ != null) {
+ statsBuilder_.dispose();
+ statsBuilder_ = null;
+ }
return this;
}
@@ -466,6 +540,9 @@ private void buildPartial0(com.google.datastore.v1.RunAggregationQueryResponse r
if (((from_bitField0_ & 0x00000004) != 0)) {
result.transaction_ = transaction_;
}
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.stats_ = statsBuilder_ == null ? stats_ : statsBuilder_.build();
+ }
}
@java.lang.Override
@@ -523,6 +600,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunAggregationQueryResponse oth
if (other.getTransaction() != com.google.protobuf.ByteString.EMPTY) {
setTransaction(other.getTransaction());
}
+ if (other.hasStats()) {
+ mergeStats(other.getStats());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -567,6 +647,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 42
+ case 50:
+ {
+ input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 50
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1026,6 +1112,216 @@ public Builder clearTransaction() {
return this;
}
+ private com.google.datastore.v1.ResultSetStats stats_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ResultSetStats,
+ com.google.datastore.v1.ResultSetStats.Builder,
+ com.google.datastore.v1.ResultSetStatsOrBuilder>
+ statsBuilder_;
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return Whether the stats field is set.
+ */
+ public boolean hasStats() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return The stats.
+ */
+ public com.google.datastore.v1.ResultSetStats getStats() {
+ if (statsBuilder_ == null) {
+ return stats_ == null
+ ? com.google.datastore.v1.ResultSetStats.getDefaultInstance()
+ : stats_;
+ } else {
+ return statsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public Builder setStats(com.google.datastore.v1.ResultSetStats value) {
+ if (statsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stats_ = value;
+ } else {
+ statsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public Builder setStats(com.google.datastore.v1.ResultSetStats.Builder builderForValue) {
+ if (statsBuilder_ == null) {
+ stats_ = builderForValue.build();
+ } else {
+ statsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public Builder mergeStats(com.google.datastore.v1.ResultSetStats value) {
+ if (statsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)
+ && stats_ != null
+ && stats_ != com.google.datastore.v1.ResultSetStats.getDefaultInstance()) {
+ getStatsBuilder().mergeFrom(value);
+ } else {
+ stats_ = value;
+ }
+ } else {
+ statsBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public Builder clearStats() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ stats_ = null;
+ if (statsBuilder_ != null) {
+ statsBuilder_.dispose();
+ statsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public com.google.datastore.v1.ResultSetStats.Builder getStatsBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return getStatsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public com.google.datastore.v1.ResultSetStatsOrBuilder getStatsOrBuilder() {
+ if (statsBuilder_ != null) {
+ return statsBuilder_.getMessageOrBuilder();
+ } else {
+ return stats_ == null
+ ? com.google.datastore.v1.ResultSetStats.getDefaultInstance()
+ : stats_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ResultSetStats,
+ com.google.datastore.v1.ResultSetStats.Builder,
+ com.google.datastore.v1.ResultSetStatsOrBuilder>
+ getStatsFieldBuilder() {
+ if (statsBuilder_ == null) {
+ statsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ResultSetStats,
+ com.google.datastore.v1.ResultSetStats.Builder,
+ com.google.datastore.v1.ResultSetStatsOrBuilder>(
+ getStats(), getParentForChildren(), isClean());
+ stats_ = null;
+ }
+ return statsBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryResponseOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryResponseOrBuilder.java
index bb9a1b934..6caa14766 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryResponseOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunAggregationQueryResponseOrBuilder.java
@@ -111,4 +111,48 @@ public interface RunAggregationQueryResponseOrBuilder
* @return The transaction.
*/
com.google.protobuf.ByteString getTransaction();
+
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return Whether the stats field is set.
+ */
+ boolean hasStats();
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return The stats.
+ */
+ com.google.datastore.v1.ResultSetStats getStats();
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ com.google.datastore.v1.ResultSetStatsOrBuilder getStatsOrBuilder();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryRequest.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryRequest.java
index 123ca5177..62666648c 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryRequest.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryRequest.java
@@ -40,6 +40,7 @@ private RunQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder> builde
private RunQueryRequest() {
projectId_ = "";
databaseId_ = "";
+ mode_ = 0;
}
@java.lang.Override
@@ -431,6 +432,46 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return com.google.datastore.v1.GqlQuery.getDefaultInstance();
}
+ public static final int MODE_FIELD_NUMBER = 11;
+ private int mode_ = 0;
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for mode.
+ */
+ @java.lang.Override
+ public int getModeValue() {
+ return mode_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The mode.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.QueryMode getMode() {
+ com.google.datastore.v1.QueryMode result = com.google.datastore.v1.QueryMode.forNumber(mode_);
+ return result == null ? com.google.datastore.v1.QueryMode.UNRECOGNIZED : result;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -463,6 +504,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, databaseId_);
}
+ if (mode_ != com.google.datastore.v1.QueryMode.NORMAL.getNumber()) {
+ output.writeEnum(11, mode_);
+ }
getUnknownFields().writeTo(output);
}
@@ -494,6 +538,9 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, databaseId_);
}
+ if (mode_ != com.google.datastore.v1.QueryMode.NORMAL.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, mode_);
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -519,6 +566,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasReadOptions()) {
if (!getReadOptions().equals(other.getReadOptions())) return false;
}
+ if (mode_ != other.mode_) return false;
if (!getQueryTypeCase().equals(other.getQueryTypeCase())) return false;
switch (queryTypeCase_) {
case 3:
@@ -553,6 +601,8 @@ public int hashCode() {
hash = (37 * hash) + READ_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getReadOptions().hashCode();
}
+ hash = (37 * hash) + MODE_FIELD_NUMBER;
+ hash = (53 * hash) + mode_;
switch (queryTypeCase_) {
case 3:
hash = (37 * hash) + QUERY_FIELD_NUMBER;
@@ -722,6 +772,7 @@ public Builder clear() {
if (gqlQueryBuilder_ != null) {
gqlQueryBuilder_.clear();
}
+ mode_ = 0;
queryTypeCase_ = 0;
queryType_ = null;
return this;
@@ -775,6 +826,9 @@ private void buildPartial0(com.google.datastore.v1.RunQueryRequest result) {
result.readOptions_ =
readOptionsBuilder_ == null ? readOptions_ : readOptionsBuilder_.build();
}
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.mode_ = mode_;
+ }
}
private void buildPartialOneofs(com.google.datastore.v1.RunQueryRequest result) {
@@ -849,6 +903,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunQueryRequest other) {
if (other.hasReadOptions()) {
mergeReadOptions(other.getReadOptions());
}
+ if (other.mode_ != 0) {
+ setModeValue(other.getModeValue());
+ }
switch (other.getQueryTypeCase()) {
case QUERY:
{
@@ -927,6 +984,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000002;
break;
} // case 74
+ case 88:
+ {
+ mode_ = input.readEnum();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 88
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1991,6 +2054,110 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return gqlQueryBuilder_;
}
+ private int mode_ = 0;
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for mode.
+ */
+ @java.lang.Override
+ public int getModeValue() {
+ return mode_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The enum numeric value on the wire for mode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModeValue(int value) {
+ mode_ = value;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The mode.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.QueryMode getMode() {
+ com.google.datastore.v1.QueryMode result = com.google.datastore.v1.QueryMode.forNumber(mode_);
+ return result == null ? com.google.datastore.v1.QueryMode.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The mode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMode(com.google.datastore.v1.QueryMode value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000040;
+ mode_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMode() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ mode_ = 0;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryRequestOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryRequestOrBuilder.java
index 34f67c822..0f2184076 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryRequestOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryRequestOrBuilder.java
@@ -228,5 +228,36 @@ public interface RunQueryRequestOrBuilder
*/
com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder();
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for mode.
+ */
+ int getModeValue();
+ /**
+ *
+ *
+ *
+ * Optional. The mode in which the query request is processed. This field is
+ * optional, and when not provided, it defaults to `NORMAL` mode where no
+ * additional statistics will be returned with the query results.
+ *
+ *
+ * .google.datastore.v1.QueryMode mode = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The mode.
+ */
+ com.google.datastore.v1.QueryMode getMode();
+
com.google.datastore.v1.RunQueryRequest.QueryTypeCase getQueryTypeCase();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryResponse.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryResponse.java
index ff387a929..a9f585048 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryResponse.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryResponse.java
@@ -179,6 +179,61 @@ public com.google.protobuf.ByteString getTransaction() {
return transaction_;
}
+ public static final int STATS_FIELD_NUMBER = 6;
+ private com.google.datastore.v1.ResultSetStats stats_;
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return Whether the stats field is set.
+ */
+ @java.lang.Override
+ public boolean hasStats() {
+ return stats_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return The stats.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ResultSetStats getStats() {
+ return stats_ == null ? com.google.datastore.v1.ResultSetStats.getDefaultInstance() : stats_;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ResultSetStatsOrBuilder getStatsOrBuilder() {
+ return stats_ == null ? com.google.datastore.v1.ResultSetStats.getDefaultInstance() : stats_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -202,6 +257,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!transaction_.isEmpty()) {
output.writeBytes(5, transaction_);
}
+ if (stats_ != null) {
+ output.writeMessage(6, getStats());
+ }
getUnknownFields().writeTo(output);
}
@@ -220,6 +278,9 @@ public int getSerializedSize() {
if (!transaction_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, transaction_);
}
+ if (stats_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStats());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -244,6 +305,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getQuery().equals(other.getQuery())) return false;
}
if (!getTransaction().equals(other.getTransaction())) return false;
+ if (hasStats() != other.hasStats()) return false;
+ if (hasStats()) {
+ if (!getStats().equals(other.getStats())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -265,6 +330,10 @@ public int hashCode() {
}
hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
hash = (53 * hash) + getTransaction().hashCode();
+ if (hasStats()) {
+ hash = (37 * hash) + STATS_FIELD_NUMBER;
+ hash = (53 * hash) + getStats().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -416,6 +485,11 @@ public Builder clear() {
queryBuilder_ = null;
}
transaction_ = com.google.protobuf.ByteString.EMPTY;
+ stats_ = null;
+ if (statsBuilder_ != null) {
+ statsBuilder_.dispose();
+ statsBuilder_ = null;
+ }
return this;
}
@@ -461,6 +535,9 @@ private void buildPartial0(com.google.datastore.v1.RunQueryResponse result) {
if (((from_bitField0_ & 0x00000004) != 0)) {
result.transaction_ = transaction_;
}
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.stats_ = statsBuilder_ == null ? stats_ : statsBuilder_.build();
+ }
}
@java.lang.Override
@@ -517,6 +594,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunQueryResponse other) {
if (other.getTransaction() != com.google.protobuf.ByteString.EMPTY) {
setTransaction(other.getTransaction());
}
+ if (other.hasStats()) {
+ mergeStats(other.getStats());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -561,6 +641,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 42
+ case 50:
+ {
+ input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 50
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1015,6 +1101,216 @@ public Builder clearTransaction() {
return this;
}
+ private com.google.datastore.v1.ResultSetStats stats_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ResultSetStats,
+ com.google.datastore.v1.ResultSetStats.Builder,
+ com.google.datastore.v1.ResultSetStatsOrBuilder>
+ statsBuilder_;
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return Whether the stats field is set.
+ */
+ public boolean hasStats() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return The stats.
+ */
+ public com.google.datastore.v1.ResultSetStats getStats() {
+ if (statsBuilder_ == null) {
+ return stats_ == null
+ ? com.google.datastore.v1.ResultSetStats.getDefaultInstance()
+ : stats_;
+ } else {
+ return statsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public Builder setStats(com.google.datastore.v1.ResultSetStats value) {
+ if (statsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stats_ = value;
+ } else {
+ statsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public Builder setStats(com.google.datastore.v1.ResultSetStats.Builder builderForValue) {
+ if (statsBuilder_ == null) {
+ stats_ = builderForValue.build();
+ } else {
+ statsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public Builder mergeStats(com.google.datastore.v1.ResultSetStats value) {
+ if (statsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)
+ && stats_ != null
+ && stats_ != com.google.datastore.v1.ResultSetStats.getDefaultInstance()) {
+ getStatsBuilder().mergeFrom(value);
+ } else {
+ stats_ = value;
+ }
+ } else {
+ statsBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public Builder clearStats() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ stats_ = null;
+ if (statsBuilder_ != null) {
+ statsBuilder_.dispose();
+ statsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public com.google.datastore.v1.ResultSetStats.Builder getStatsBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return getStatsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ public com.google.datastore.v1.ResultSetStatsOrBuilder getStatsOrBuilder() {
+ if (statsBuilder_ != null) {
+ return statsBuilder_.getMessageOrBuilder();
+ } else {
+ return stats_ == null
+ ? com.google.datastore.v1.ResultSetStats.getDefaultInstance()
+ : stats_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ResultSetStats,
+ com.google.datastore.v1.ResultSetStats.Builder,
+ com.google.datastore.v1.ResultSetStatsOrBuilder>
+ getStatsFieldBuilder() {
+ if (statsBuilder_ == null) {
+ statsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ResultSetStats,
+ com.google.datastore.v1.ResultSetStats.Builder,
+ com.google.datastore.v1.ResultSetStatsOrBuilder>(
+ getStats(), getParentForChildren(), isClean());
+ stats_ = null;
+ }
+ return statsBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryResponseOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryResponseOrBuilder.java
index 5ec779273..bbd48b7b5 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryResponseOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/RunQueryResponseOrBuilder.java
@@ -111,4 +111,48 @@ public interface RunQueryResponseOrBuilder
* @return The transaction.
*/
com.google.protobuf.ByteString getTransaction();
+
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return Whether the stats field is set.
+ */
+ boolean hasStats();
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ *
+ * @return The stats.
+ */
+ com.google.datastore.v1.ResultSetStats getStats();
+ /**
+ *
+ *
+ *
+ * Query plan and execution statistics. Note that the returned stats are
+ * subject to change as Firestore evolves.
+ *
+ * This is only present when the request specifies a mode other than `NORMAL`.
+ *
+ *
+ * .google.datastore.v1.ResultSetStats stats = 6;
+ */
+ com.google.datastore.v1.ResultSetStatsOrBuilder getStatsOrBuilder();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
index 533988d77..476d48f02 100644
--- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
@@ -23,6 +23,7 @@ import "google/api/routing.proto";
import "google/datastore/v1/aggregation_result.proto";
import "google/datastore/v1/entity.proto";
import "google/datastore/v1/query.proto";
+import "google/datastore/v1/query_profile.proto";
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.Datastore.V1";
@@ -232,6 +233,11 @@ message RunQueryRequest {
// The GQL query to run. This query must be a non-aggregation query.
GqlQuery gql_query = 7;
}
+
+ // Optional. The mode in which the query request is processed. This field is
+ // optional, and when not provided, it defaults to `NORMAL` mode where no
+ // additional statistics will be returned with the query results.
+ QueryMode mode = 11 [(google.api.field_behavior) = OPTIONAL];
}
// The response for
@@ -251,6 +257,12 @@ message RunQueryResponse {
// was set in
// [RunQueryRequest.read_options][google.datastore.v1.RunQueryRequest.read_options].
bytes transaction = 5;
+
+ // Query plan and execution statistics. Note that the returned stats are
+ // subject to change as Firestore evolves.
+ //
+ // This is only present when the request specifies a mode other than `NORMAL`.
+ ResultSetStats stats = 6;
}
// The request for
@@ -282,6 +294,11 @@ message RunAggregationQueryRequest {
// The GQL query to run. This query must be an aggregation query.
GqlQuery gql_query = 7;
}
+
+ // Optional. The mode in which the query request is processed. This field is
+ // optional, and when not provided, it defaults to `NORMAL` mode where no
+ // additional statistics will be returned with the query results.
+ QueryMode mode = 10 [(google.api.field_behavior) = OPTIONAL];
}
// The response for
@@ -301,6 +318,12 @@ message RunAggregationQueryResponse {
// was set in
// [RunAggregationQueryRequest.read_options][google.datastore.v1.RunAggregationQueryRequest.read_options].
bytes transaction = 5;
+
+ // Query plan and execution statistics. Note that the returned stats are
+ // subject to change as Firestore evolves.
+ //
+ // This is only present when the request specifies a mode other than `NORMAL`.
+ ResultSetStats stats = 6;
}
// The request for
diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query_profile.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query_profile.proto
new file mode 100644
index 000000000..05c1cf95e
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query_profile.proto
@@ -0,0 +1,75 @@
+// Copyright 2023 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// 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";
+
+package google.datastore.v1;
+
+import "google/protobuf/struct.proto";
+
+option csharp_namespace = "Google.Cloud.Datastore.V1";
+option go_package = "google.golang.org/genproto/googleapis/datastore/v1;datastore";
+option java_multiple_files = true;
+option java_outer_classname = "QueryProfileProto";
+option java_package = "com.google.datastore.v1";
+option php_namespace = "Google\\Cloud\\Datastore\\V1";
+option ruby_package = "Google::Cloud::Datastore::V1";
+
+// Specification of the Datastore Query Profile fields.
+
+// The mode in which the query request must be processed.
+enum QueryMode {
+ // The default mode. Only the query results are returned.
+ NORMAL = 0;
+
+ // This mode returns only the query plan, without any results or execution
+ // statistics information.
+ PLAN = 1;
+
+ // This mode returns both the query plan and the execution statistics along
+ // with the results.
+ PROFILE = 2;
+}
+
+// Plan for the query.
+message QueryPlan {
+ // Planning phase information for the query. It will include:
+ //
+ // {
+ // "indexes_used": [
+ // {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ // {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ // ]
+ // }
+ google.protobuf.Struct plan_info = 1;
+}
+
+// Planning and execution statistics for the query.
+message ResultSetStats {
+ // Plan for the query.
+ QueryPlan query_plan = 1;
+
+ // Aggregated statistics from the execution of the query.
+ //
+ // This will only be present when the request specifies `PROFILE` mode.
+ // For example, a query will return the statistics including:
+ //
+ // {
+ // "results_returned": "20",
+ // "documents_scanned": "20",
+ // "indexes_entries_scanned": "10050",
+ // "total_execution_time": "100.7 msecs"
+ // }
+ google.protobuf.Struct query_stats = 2;
+}
From 1849e0be44e94fbfa48211484de4af602ca6b614 Mon Sep 17 00:00:00 2001
From: Mend Renovate
- *
*
* Method
* Description
* Method Variants
+ *
- *
* ExportEntities
+ *
*
*
*
*
- *
*
- *
*
- *
*
- *
* ImportEntities
+ *
*
*
*
*
- *
*
- *
*
- *
*
- *
* CreateIndex
+ *
*
*
*
*
- *
*
- *
*
- *
* DeleteIndex
+ *
*
*
*
*
- *
*
- *
*
- *
* GetIndex
+ *
*
*
*
*
- *
*
- *
*
- *
diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
index 6de58e7f0..e3c2b7d1d 100644
--- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
+++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
@@ -258,6 +258,15 @@ public DatastoreAdminStub createStub() throws IOException {
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}
+ /** Returns the endpoint set by the user or the the service's default endpoint. */
+ @Override
+ public String getEndpoint() {
+ if (super.getEndpoint() != null) {
+ return super.getEndpoint();
+ }
+ return getDefaultEndpoint();
+ }
+
/** Returns the default service name. */
@Override
public String getServiceName() {
@@ -491,7 +500,6 @@ private static Builder createDefault() {
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
@@ -504,7 +512,6 @@ private static Builder createHttpJsonDefault() {
builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
- builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
@@ -719,6 +726,15 @@ public UnaryCallSettings.BuilderListIndexes
+ *
*
*
*
*
- *
*
- *
*