This class is for advanced usage.
*/
@Generated("by gapic-generator-java")
-@BetaApi
public class HttpJsonDatastoreAdminCallableFactory
implements HttpJsonStubCallableFactory This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
-@BetaApi
public class HttpJsonDatastoreAdminStub extends DatastoreAdminStub {
private static final TypeRegistry typeRegistry =
TypeRegistry.newBuilder()
diff --git a/grpc-google-cloud-datastore-admin-v1/pom.xml b/grpc-google-cloud-datastore-admin-v1/pom.xml
index d1638f6e0..c47481cfe 100644
--- a/grpc-google-cloud-datastore-admin-v1/pom.xml
+++ b/grpc-google-cloud-datastore-admin-v1/pom.xml
@@ -4,13 +4,13 @@
+ * Total number of results returned, including documents, projections, + * aggregation results, keys. + *+ * + *
int64 results_returned = 1;
+ *
+ * @return The resultsReturned.
+ */
+ @java.lang.Override
+ public long getResultsReturned() {
+ return resultsReturned_;
+ }
+
+ public static final int EXECUTION_DURATION_FIELD_NUMBER = 3;
+ private com.google.protobuf.Duration executionDuration_;
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ *
+ * @return Whether the executionDuration field is set.
+ */
+ @java.lang.Override
+ public boolean hasExecutionDuration() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ *
+ * @return The executionDuration.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Duration getExecutionDuration() {
+ return executionDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : executionDuration_;
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.DurationOrBuilder getExecutionDurationOrBuilder() {
+ return executionDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : executionDuration_;
+ }
+
+ public static final int READ_OPERATIONS_FIELD_NUMBER = 4;
+ private long readOperations_ = 0L;
+ /**
+ *
+ *
+ * + * Total billable read operations. + *+ * + *
int64 read_operations = 4;
+ *
+ * @return The readOperations.
+ */
+ @java.lang.Override
+ public long getReadOperations() {
+ return readOperations_;
+ }
+
+ public static final int DEBUG_STATS_FIELD_NUMBER = 5;
+ private com.google.protobuf.Struct debugStats_;
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ *
+ * @return Whether the debugStats field is set.
+ */
+ @java.lang.Override
+ public boolean hasDebugStats() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ *
+ * @return The debugStats.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getDebugStats() {
+ return debugStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : debugStats_;
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getDebugStatsOrBuilder() {
+ return debugStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : debugStats_;
+ }
+
+ 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 (resultsReturned_ != 0L) {
+ output.writeInt64(1, resultsReturned_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(3, getExecutionDuration());
+ }
+ if (readOperations_ != 0L) {
+ output.writeInt64(4, readOperations_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(5, getDebugStats());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (resultsReturned_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, resultsReturned_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExecutionDuration());
+ }
+ if (readOperations_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, readOperations_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDebugStats());
+ }
+ 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.ExecutionStats)) {
+ return super.equals(obj);
+ }
+ com.google.datastore.v1.ExecutionStats other = (com.google.datastore.v1.ExecutionStats) obj;
+
+ if (getResultsReturned() != other.getResultsReturned()) return false;
+ if (hasExecutionDuration() != other.hasExecutionDuration()) return false;
+ if (hasExecutionDuration()) {
+ if (!getExecutionDuration().equals(other.getExecutionDuration())) return false;
+ }
+ if (getReadOperations() != other.getReadOperations()) return false;
+ if (hasDebugStats() != other.hasDebugStats()) return false;
+ if (hasDebugStats()) {
+ if (!getDebugStats().equals(other.getDebugStats())) 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();
+ hash = (37 * hash) + RESULTS_RETURNED_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getResultsReturned());
+ if (hasExecutionDuration()) {
+ hash = (37 * hash) + EXECUTION_DURATION_FIELD_NUMBER;
+ hash = (53 * hash) + getExecutionDuration().hashCode();
+ }
+ hash = (37 * hash) + READ_OPERATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReadOperations());
+ if (hasDebugStats()) {
+ hash = (37 * hash) + DEBUG_STATS_FIELD_NUMBER;
+ hash = (53 * hash) + getDebugStats().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.datastore.v1.ExecutionStats parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExecutionStats 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.ExecutionStats parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExecutionStats 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.ExecutionStats parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExecutionStats parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.ExecutionStats parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExecutionStats 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.ExecutionStats parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExecutionStats 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.ExecutionStats parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExecutionStats 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.ExecutionStats 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;
+ }
+ /**
+ *
+ *
+ * + * Execution statistics for the query. + *+ * + * Protobuf type {@code google.datastore.v1.ExecutionStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Total number of results returned, including documents, projections, + * aggregation results, keys. + *+ * + *
int64 results_returned = 1;
+ *
+ * @return The resultsReturned.
+ */
+ @java.lang.Override
+ public long getResultsReturned() {
+ return resultsReturned_;
+ }
+ /**
+ *
+ *
+ * + * Total number of results returned, including documents, projections, + * aggregation results, keys. + *+ * + *
int64 results_returned = 1;
+ *
+ * @param value The resultsReturned to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResultsReturned(long value) {
+
+ resultsReturned_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total number of results returned, including documents, projections, + * aggregation results, keys. + *+ * + *
int64 results_returned = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearResultsReturned() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ resultsReturned_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Duration executionDuration_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ executionDurationBuilder_;
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ *
+ * @return Whether the executionDuration field is set.
+ */
+ public boolean hasExecutionDuration() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ *
+ * @return The executionDuration.
+ */
+ public com.google.protobuf.Duration getExecutionDuration() {
+ if (executionDurationBuilder_ == null) {
+ return executionDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : executionDuration_;
+ } else {
+ return executionDurationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ public Builder setExecutionDuration(com.google.protobuf.Duration value) {
+ if (executionDurationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ executionDuration_ = value;
+ } else {
+ executionDurationBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ public Builder setExecutionDuration(com.google.protobuf.Duration.Builder builderForValue) {
+ if (executionDurationBuilder_ == null) {
+ executionDuration_ = builderForValue.build();
+ } else {
+ executionDurationBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ public Builder mergeExecutionDuration(com.google.protobuf.Duration value) {
+ if (executionDurationBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && executionDuration_ != null
+ && executionDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
+ getExecutionDurationBuilder().mergeFrom(value);
+ } else {
+ executionDuration_ = value;
+ }
+ } else {
+ executionDurationBuilder_.mergeFrom(value);
+ }
+ if (executionDuration_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ public Builder clearExecutionDuration() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ executionDuration_ = null;
+ if (executionDurationBuilder_ != null) {
+ executionDurationBuilder_.dispose();
+ executionDurationBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ public com.google.protobuf.Duration.Builder getExecutionDurationBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getExecutionDurationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ public com.google.protobuf.DurationOrBuilder getExecutionDurationOrBuilder() {
+ if (executionDurationBuilder_ != null) {
+ return executionDurationBuilder_.getMessageOrBuilder();
+ } else {
+ return executionDuration_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : executionDuration_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getExecutionDurationFieldBuilder() {
+ if (executionDurationBuilder_ == null) {
+ executionDurationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getExecutionDuration(), getParentForChildren(), isClean());
+ executionDuration_ = null;
+ }
+ return executionDurationBuilder_;
+ }
+
+ private long readOperations_;
+ /**
+ *
+ *
+ * + * Total billable read operations. + *+ * + *
int64 read_operations = 4;
+ *
+ * @return The readOperations.
+ */
+ @java.lang.Override
+ public long getReadOperations() {
+ return readOperations_;
+ }
+ /**
+ *
+ *
+ * + * Total billable read operations. + *+ * + *
int64 read_operations = 4;
+ *
+ * @param value The readOperations to set.
+ * @return This builder for chaining.
+ */
+ public Builder setReadOperations(long value) {
+
+ readOperations_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total billable read operations. + *+ * + *
int64 read_operations = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearReadOperations() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ readOperations_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Struct debugStats_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ debugStatsBuilder_;
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ *
+ * @return Whether the debugStats field is set.
+ */
+ public boolean hasDebugStats() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ *
+ * @return The debugStats.
+ */
+ public com.google.protobuf.Struct getDebugStats() {
+ if (debugStatsBuilder_ == null) {
+ return debugStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : debugStats_;
+ } else {
+ return debugStatsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ public Builder setDebugStats(com.google.protobuf.Struct value) {
+ if (debugStatsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ debugStats_ = value;
+ } else {
+ debugStatsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ public Builder setDebugStats(com.google.protobuf.Struct.Builder builderForValue) {
+ if (debugStatsBuilder_ == null) {
+ debugStats_ = builderForValue.build();
+ } else {
+ debugStatsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ public Builder mergeDebugStats(com.google.protobuf.Struct value) {
+ if (debugStatsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)
+ && debugStats_ != null
+ && debugStats_ != com.google.protobuf.Struct.getDefaultInstance()) {
+ getDebugStatsBuilder().mergeFrom(value);
+ } else {
+ debugStats_ = value;
+ }
+ } else {
+ debugStatsBuilder_.mergeFrom(value);
+ }
+ if (debugStats_ != null) {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ public Builder clearDebugStats() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ debugStats_ = null;
+ if (debugStatsBuilder_ != null) {
+ debugStatsBuilder_.dispose();
+ debugStatsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ public com.google.protobuf.Struct.Builder getDebugStatsBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return getDebugStatsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ public com.google.protobuf.StructOrBuilder getDebugStatsOrBuilder() {
+ if (debugStatsBuilder_ != null) {
+ return debugStatsBuilder_.getMessageOrBuilder();
+ } else {
+ return debugStats_ == null ? com.google.protobuf.Struct.getDefaultInstance() : debugStats_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ getDebugStatsFieldBuilder() {
+ if (debugStatsBuilder_ == null) {
+ debugStatsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>(
+ getDebugStats(), getParentForChildren(), isClean());
+ debugStats_ = null;
+ }
+ return debugStatsBuilder_;
+ }
+
+ @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.ExecutionStats)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.datastore.v1.ExecutionStats)
+ private static final com.google.datastore.v1.ExecutionStats DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.datastore.v1.ExecutionStats();
+ }
+
+ public static com.google.datastore.v1.ExecutionStats getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Total number of results returned, including documents, projections, + * aggregation results, keys. + *+ * + *
int64 results_returned = 1;
+ *
+ * @return The resultsReturned.
+ */
+ long getResultsReturned();
+
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ *
+ * @return Whether the executionDuration field is set.
+ */
+ boolean hasExecutionDuration();
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ *
+ * @return The executionDuration.
+ */
+ com.google.protobuf.Duration getExecutionDuration();
+ /**
+ *
+ *
+ * + * Total time to execute the query in the backend. + *+ * + *
.google.protobuf.Duration execution_duration = 3;
+ */
+ com.google.protobuf.DurationOrBuilder getExecutionDurationOrBuilder();
+
+ /**
+ *
+ *
+ * + * Total billable read operations. + *+ * + *
int64 read_operations = 4;
+ *
+ * @return The readOperations.
+ */
+ long getReadOperations();
+
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ *
+ * @return Whether the debugStats field is set.
+ */
+ boolean hasDebugStats();
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ *
+ * @return The debugStats.
+ */
+ com.google.protobuf.Struct getDebugStats();
+ /**
+ *
+ *
+ * + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + *+ * + *
.google.protobuf.Struct debug_stats = 5;
+ */
+ com.google.protobuf.StructOrBuilder getDebugStatsOrBuilder();
+}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ExplainMetrics.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ExplainMetrics.java
new file mode 100644
index 000000000..9bb2c4872
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ExplainMetrics.java
@@ -0,0 +1,1014 @@
+/*
+ * Copyright 2024 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
+
+// Protobuf Java Version: 3.25.2
+package com.google.datastore.v1;
+
+/**
+ *
+ *
+ * + * Explain metrics for the query. + *+ * + * Protobuf type {@code google.datastore.v1.ExplainMetrics} + */ +public final class ExplainMetrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.datastore.v1.ExplainMetrics) + ExplainMetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExplainMetrics.newBuilder() to construct. + private ExplainMetrics(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ExplainMetrics() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExplainMetrics(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.datastore.v1.QueryProfileProto + .internal_static_google_datastore_v1_ExplainMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.datastore.v1.QueryProfileProto + .internal_static_google_datastore_v1_ExplainMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.datastore.v1.ExplainMetrics.class, + com.google.datastore.v1.ExplainMetrics.Builder.class); + } + + private int bitField0_; + public static final int PLAN_SUMMARY_FIELD_NUMBER = 1; + private com.google.datastore.v1.PlanSummary planSummary_; + /** + * + * + *
+ * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ *
+ * @return Whether the planSummary field is set.
+ */
+ @java.lang.Override
+ public boolean hasPlanSummary() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ *
+ * @return The planSummary.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PlanSummary getPlanSummary() {
+ return planSummary_ == null
+ ? com.google.datastore.v1.PlanSummary.getDefaultInstance()
+ : planSummary_;
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PlanSummaryOrBuilder getPlanSummaryOrBuilder() {
+ return planSummary_ == null
+ ? com.google.datastore.v1.PlanSummary.getDefaultInstance()
+ : planSummary_;
+ }
+
+ public static final int EXECUTION_STATS_FIELD_NUMBER = 2;
+ private com.google.datastore.v1.ExecutionStats executionStats_;
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ *
+ * @return Whether the executionStats field is set.
+ */
+ @java.lang.Override
+ public boolean hasExecutionStats() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ *
+ * @return The executionStats.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExecutionStats getExecutionStats() {
+ return executionStats_ == null
+ ? com.google.datastore.v1.ExecutionStats.getDefaultInstance()
+ : executionStats_;
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExecutionStatsOrBuilder getExecutionStatsOrBuilder() {
+ return executionStats_ == null
+ ? com.google.datastore.v1.ExecutionStats.getDefaultInstance()
+ : executionStats_;
+ }
+
+ 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 (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getPlanSummary());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(2, getExecutionStats());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPlanSummary());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExecutionStats());
+ }
+ 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.ExplainMetrics)) {
+ return super.equals(obj);
+ }
+ com.google.datastore.v1.ExplainMetrics other = (com.google.datastore.v1.ExplainMetrics) obj;
+
+ if (hasPlanSummary() != other.hasPlanSummary()) return false;
+ if (hasPlanSummary()) {
+ if (!getPlanSummary().equals(other.getPlanSummary())) return false;
+ }
+ if (hasExecutionStats() != other.hasExecutionStats()) return false;
+ if (hasExecutionStats()) {
+ if (!getExecutionStats().equals(other.getExecutionStats())) 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 (hasPlanSummary()) {
+ hash = (37 * hash) + PLAN_SUMMARY_FIELD_NUMBER;
+ hash = (53 * hash) + getPlanSummary().hashCode();
+ }
+ if (hasExecutionStats()) {
+ hash = (37 * hash) + EXECUTION_STATS_FIELD_NUMBER;
+ hash = (53 * hash) + getExecutionStats().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics 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.ExplainMetrics parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics 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.ExplainMetrics parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics 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.ExplainMetrics parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics 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.ExplainMetrics parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics 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.ExplainMetrics 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;
+ }
+ /**
+ *
+ *
+ * + * Explain metrics for the query. + *+ * + * Protobuf type {@code google.datastore.v1.ExplainMetrics} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ *
+ * @return Whether the planSummary field is set.
+ */
+ public boolean hasPlanSummary() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ *
+ * @return The planSummary.
+ */
+ public com.google.datastore.v1.PlanSummary getPlanSummary() {
+ if (planSummaryBuilder_ == null) {
+ return planSummary_ == null
+ ? com.google.datastore.v1.PlanSummary.getDefaultInstance()
+ : planSummary_;
+ } else {
+ return planSummaryBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ public Builder setPlanSummary(com.google.datastore.v1.PlanSummary value) {
+ if (planSummaryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ planSummary_ = value;
+ } else {
+ planSummaryBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ public Builder setPlanSummary(com.google.datastore.v1.PlanSummary.Builder builderForValue) {
+ if (planSummaryBuilder_ == null) {
+ planSummary_ = builderForValue.build();
+ } else {
+ planSummaryBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ public Builder mergePlanSummary(com.google.datastore.v1.PlanSummary value) {
+ if (planSummaryBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && planSummary_ != null
+ && planSummary_ != com.google.datastore.v1.PlanSummary.getDefaultInstance()) {
+ getPlanSummaryBuilder().mergeFrom(value);
+ } else {
+ planSummary_ = value;
+ }
+ } else {
+ planSummaryBuilder_.mergeFrom(value);
+ }
+ if (planSummary_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ public Builder clearPlanSummary() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ planSummary_ = null;
+ if (planSummaryBuilder_ != null) {
+ planSummaryBuilder_.dispose();
+ planSummaryBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ public com.google.datastore.v1.PlanSummary.Builder getPlanSummaryBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getPlanSummaryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ public com.google.datastore.v1.PlanSummaryOrBuilder getPlanSummaryOrBuilder() {
+ if (planSummaryBuilder_ != null) {
+ return planSummaryBuilder_.getMessageOrBuilder();
+ } else {
+ return planSummary_ == null
+ ? com.google.datastore.v1.PlanSummary.getDefaultInstance()
+ : planSummary_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PlanSummary,
+ com.google.datastore.v1.PlanSummary.Builder,
+ com.google.datastore.v1.PlanSummaryOrBuilder>
+ getPlanSummaryFieldBuilder() {
+ if (planSummaryBuilder_ == null) {
+ planSummaryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PlanSummary,
+ com.google.datastore.v1.PlanSummary.Builder,
+ com.google.datastore.v1.PlanSummaryOrBuilder>(
+ getPlanSummary(), getParentForChildren(), isClean());
+ planSummary_ = null;
+ }
+ return planSummaryBuilder_;
+ }
+
+ private com.google.datastore.v1.ExecutionStats executionStats_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExecutionStats,
+ com.google.datastore.v1.ExecutionStats.Builder,
+ com.google.datastore.v1.ExecutionStatsOrBuilder>
+ executionStatsBuilder_;
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ *
+ * @return Whether the executionStats field is set.
+ */
+ public boolean hasExecutionStats() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ *
+ * @return The executionStats.
+ */
+ public com.google.datastore.v1.ExecutionStats getExecutionStats() {
+ if (executionStatsBuilder_ == null) {
+ return executionStats_ == null
+ ? com.google.datastore.v1.ExecutionStats.getDefaultInstance()
+ : executionStats_;
+ } else {
+ return executionStatsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ public Builder setExecutionStats(com.google.datastore.v1.ExecutionStats value) {
+ if (executionStatsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ executionStats_ = value;
+ } else {
+ executionStatsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ public Builder setExecutionStats(
+ com.google.datastore.v1.ExecutionStats.Builder builderForValue) {
+ if (executionStatsBuilder_ == null) {
+ executionStats_ = builderForValue.build();
+ } else {
+ executionStatsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ public Builder mergeExecutionStats(com.google.datastore.v1.ExecutionStats value) {
+ if (executionStatsBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && executionStats_ != null
+ && executionStats_ != com.google.datastore.v1.ExecutionStats.getDefaultInstance()) {
+ getExecutionStatsBuilder().mergeFrom(value);
+ } else {
+ executionStats_ = value;
+ }
+ } else {
+ executionStatsBuilder_.mergeFrom(value);
+ }
+ if (executionStats_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ public Builder clearExecutionStats() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ executionStats_ = null;
+ if (executionStatsBuilder_ != null) {
+ executionStatsBuilder_.dispose();
+ executionStatsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ public com.google.datastore.v1.ExecutionStats.Builder getExecutionStatsBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getExecutionStatsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ public com.google.datastore.v1.ExecutionStatsOrBuilder getExecutionStatsOrBuilder() {
+ if (executionStatsBuilder_ != null) {
+ return executionStatsBuilder_.getMessageOrBuilder();
+ } else {
+ return executionStats_ == null
+ ? com.google.datastore.v1.ExecutionStats.getDefaultInstance()
+ : executionStats_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExecutionStats,
+ com.google.datastore.v1.ExecutionStats.Builder,
+ com.google.datastore.v1.ExecutionStatsOrBuilder>
+ getExecutionStatsFieldBuilder() {
+ if (executionStatsBuilder_ == null) {
+ executionStatsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExecutionStats,
+ com.google.datastore.v1.ExecutionStats.Builder,
+ com.google.datastore.v1.ExecutionStatsOrBuilder>(
+ getExecutionStats(), getParentForChildren(), isClean());
+ executionStats_ = null;
+ }
+ return executionStatsBuilder_;
+ }
+
+ @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.ExplainMetrics)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.datastore.v1.ExplainMetrics)
+ private static final com.google.datastore.v1.ExplainMetrics DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.datastore.v1.ExplainMetrics();
+ }
+
+ public static com.google.datastore.v1.ExplainMetrics getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ *
+ * @return Whether the planSummary field is set.
+ */
+ boolean hasPlanSummary();
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ *
+ * @return The planSummary.
+ */
+ com.google.datastore.v1.PlanSummary getPlanSummary();
+ /**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + *
.google.datastore.v1.PlanSummary plan_summary = 1;
+ */
+ com.google.datastore.v1.PlanSummaryOrBuilder getPlanSummaryOrBuilder();
+
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ *
+ * @return Whether the executionStats field is set.
+ */
+ boolean hasExecutionStats();
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ *
+ * @return The executionStats.
+ */
+ com.google.datastore.v1.ExecutionStats getExecutionStats();
+ /**
+ *
+ *
+ * + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set + * to true. + *+ * + *
.google.datastore.v1.ExecutionStats execution_stats = 2;
+ */
+ com.google.datastore.v1.ExecutionStatsOrBuilder getExecutionStatsOrBuilder();
+}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ExplainOptions.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ExplainOptions.java
new file mode 100644
index 000000000..78fa71cd5
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ExplainOptions.java
@@ -0,0 +1,557 @@
+/*
+ * Copyright 2024 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
+
+// Protobuf Java Version: 3.25.2
+package com.google.datastore.v1;
+
+/**
+ *
+ *
+ * + * Explain options for the query. + *+ * + * Protobuf type {@code google.datastore.v1.ExplainOptions} + */ +public final class ExplainOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.datastore.v1.ExplainOptions) + ExplainOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExplainOptions.newBuilder() to construct. + private ExplainOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ExplainOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExplainOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.datastore.v1.QueryProfileProto + .internal_static_google_datastore_v1_ExplainOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.datastore.v1.QueryProfileProto + .internal_static_google_datastore_v1_ExplainOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.datastore.v1.ExplainOptions.class, + com.google.datastore.v1.ExplainOptions.Builder.class); + } + + public static final int ANALYZE_FIELD_NUMBER = 1; + private boolean analyze_ = false; + /** + * + * + *
+ * Optional. Whether to execute this query. + * + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + *+ * + *
bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The analyze.
+ */
+ @java.lang.Override
+ public boolean getAnalyze() {
+ return analyze_;
+ }
+
+ 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 (analyze_ != false) {
+ output.writeBool(1, analyze_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (analyze_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, analyze_);
+ }
+ 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.ExplainOptions)) {
+ return super.equals(obj);
+ }
+ com.google.datastore.v1.ExplainOptions other = (com.google.datastore.v1.ExplainOptions) obj;
+
+ if (getAnalyze() != other.getAnalyze()) 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();
+ hash = (37 * hash) + ANALYZE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnalyze());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.datastore.v1.ExplainOptions parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExplainOptions 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.ExplainOptions parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExplainOptions 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.ExplainOptions parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.ExplainOptions parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.ExplainOptions parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExplainOptions 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.ExplainOptions parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExplainOptions 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.ExplainOptions parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.ExplainOptions 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.ExplainOptions 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;
+ }
+ /**
+ *
+ *
+ * + * Explain options for the query. + *+ * + * Protobuf type {@code google.datastore.v1.ExplainOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. Whether to execute this query. + * + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + *+ * + *
bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The analyze.
+ */
+ @java.lang.Override
+ public boolean getAnalyze() {
+ return analyze_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Whether to execute this query. + * + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + *+ * + *
bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The analyze to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAnalyze(boolean value) {
+
+ analyze_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Whether to execute this query. + * + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + *+ * + *
bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAnalyze() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ analyze_ = false;
+ onChanged();
+ return this;
+ }
+
+ @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.ExplainOptions)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.datastore.v1.ExplainOptions)
+ private static final com.google.datastore.v1.ExplainOptions DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.datastore.v1.ExplainOptions();
+ }
+
+ public static com.google.datastore.v1.ExplainOptions getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Optional. Whether to execute this query. + * + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + *+ * + *
bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The analyze.
+ */
+ boolean getAnalyze();
+}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PlanSummary.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PlanSummary.java
new file mode 100644
index 000000000..90df86457
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PlanSummary.java
@@ -0,0 +1,1019 @@
+/*
+ * Copyright 2024 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
+
+// Protobuf Java Version: 3.25.2
+package com.google.datastore.v1;
+
+/**
+ *
+ *
+ * + * Planning phase information for the query. + *+ * + * Protobuf type {@code google.datastore.v1.PlanSummary} + */ +public final class PlanSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.datastore.v1.PlanSummary) + PlanSummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlanSummary.newBuilder() to construct. + private PlanSummary(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private PlanSummary() { + indexesUsed_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlanSummary(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.datastore.v1.QueryProfileProto + .internal_static_google_datastore_v1_PlanSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.datastore.v1.QueryProfileProto + .internal_static_google_datastore_v1_PlanSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.datastore.v1.PlanSummary.class, + com.google.datastore.v1.PlanSummary.Builder.class); + } + + public static final int INDEXES_USED_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List
+ * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ @java.lang.Override
+ public java.util.List+ * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.protobuf.StructOrBuilder>
+ getIndexesUsedOrBuilderList() {
+ return indexesUsed_;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ @java.lang.Override
+ public int getIndexesUsedCount() {
+ return indexesUsed_.size();
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getIndexesUsed(int index) {
+ return indexesUsed_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getIndexesUsedOrBuilder(int index) {
+ return indexesUsed_.get(index);
+ }
+
+ 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 {
+ for (int i = 0; i < indexesUsed_.size(); i++) {
+ output.writeMessage(1, indexesUsed_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < indexesUsed_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, indexesUsed_.get(i));
+ }
+ 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.PlanSummary)) {
+ return super.equals(obj);
+ }
+ com.google.datastore.v1.PlanSummary other = (com.google.datastore.v1.PlanSummary) obj;
+
+ if (!getIndexesUsedList().equals(other.getIndexesUsedList())) 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 (getIndexesUsedCount() > 0) {
+ hash = (37 * hash) + INDEXES_USED_FIELD_NUMBER;
+ hash = (53 * hash) + getIndexesUsedList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.datastore.v1.PlanSummary parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PlanSummary 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.PlanSummary parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PlanSummary 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.PlanSummary parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PlanSummary parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.PlanSummary parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PlanSummary 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.PlanSummary parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PlanSummary 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.PlanSummary parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PlanSummary 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.PlanSummary 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 phase information for the query. + *+ * + * Protobuf type {@code google.datastore.v1.PlanSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public java.util.List+ * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public int getIndexesUsedCount() {
+ if (indexesUsedBuilder_ == null) {
+ return indexesUsed_.size();
+ } else {
+ return indexesUsedBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public com.google.protobuf.Struct getIndexesUsed(int index) {
+ if (indexesUsedBuilder_ == null) {
+ return indexesUsed_.get(index);
+ } else {
+ return indexesUsedBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder setIndexesUsed(int index, com.google.protobuf.Struct value) {
+ if (indexesUsedBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndexesUsedIsMutable();
+ indexesUsed_.set(index, value);
+ onChanged();
+ } else {
+ indexesUsedBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder setIndexesUsed(int index, com.google.protobuf.Struct.Builder builderForValue) {
+ if (indexesUsedBuilder_ == null) {
+ ensureIndexesUsedIsMutable();
+ indexesUsed_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ indexesUsedBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder addIndexesUsed(com.google.protobuf.Struct value) {
+ if (indexesUsedBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndexesUsedIsMutable();
+ indexesUsed_.add(value);
+ onChanged();
+ } else {
+ indexesUsedBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder addIndexesUsed(int index, com.google.protobuf.Struct value) {
+ if (indexesUsedBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIndexesUsedIsMutable();
+ indexesUsed_.add(index, value);
+ onChanged();
+ } else {
+ indexesUsedBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder addIndexesUsed(com.google.protobuf.Struct.Builder builderForValue) {
+ if (indexesUsedBuilder_ == null) {
+ ensureIndexesUsedIsMutable();
+ indexesUsed_.add(builderForValue.build());
+ onChanged();
+ } else {
+ indexesUsedBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder addIndexesUsed(int index, com.google.protobuf.Struct.Builder builderForValue) {
+ if (indexesUsedBuilder_ == null) {
+ ensureIndexesUsedIsMutable();
+ indexesUsed_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ indexesUsedBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder addAllIndexesUsed(
+ java.lang.Iterable extends com.google.protobuf.Struct> values) {
+ if (indexesUsedBuilder_ == null) {
+ ensureIndexesUsedIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexesUsed_);
+ onChanged();
+ } else {
+ indexesUsedBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder clearIndexesUsed() {
+ if (indexesUsedBuilder_ == null) {
+ indexesUsed_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ indexesUsedBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public Builder removeIndexesUsed(int index) {
+ if (indexesUsedBuilder_ == null) {
+ ensureIndexesUsedIsMutable();
+ indexesUsed_.remove(index);
+ onChanged();
+ } else {
+ indexesUsedBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public com.google.protobuf.Struct.Builder getIndexesUsedBuilder(int index) {
+ return getIndexesUsedFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public com.google.protobuf.StructOrBuilder getIndexesUsedOrBuilder(int index) {
+ if (indexesUsedBuilder_ == null) {
+ return indexesUsed_.get(index);
+ } else {
+ return indexesUsedBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public java.util.List extends com.google.protobuf.StructOrBuilder>
+ getIndexesUsedOrBuilderList() {
+ if (indexesUsedBuilder_ != null) {
+ return indexesUsedBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(indexesUsed_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public com.google.protobuf.Struct.Builder addIndexesUsedBuilder() {
+ return getIndexesUsedFieldBuilder()
+ .addBuilder(com.google.protobuf.Struct.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public com.google.protobuf.Struct.Builder addIndexesUsedBuilder(int index) {
+ return getIndexesUsedFieldBuilder()
+ .addBuilder(index, com.google.protobuf.Struct.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ public java.util.List+ * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ java.util.List+ * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ com.google.protobuf.Struct getIndexesUsed(int index);
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ int getIndexesUsedCount();
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ java.util.List extends com.google.protobuf.StructOrBuilder> getIndexesUsedOrBuilderList();
+ /**
+ *
+ *
+ * + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + *+ * + *
repeated .google.protobuf.Struct indexes_used = 1;
+ */
+ com.google.protobuf.StructOrBuilder getIndexesUsedOrBuilder(int index);
+}
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..85089166a
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryProfileProto.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2024 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
+
+// Protobuf Java Version: 3.25.2
+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_ExplainOptions_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_datastore_v1_ExplainOptions_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_datastore_v1_ExplainMetrics_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_datastore_v1_ExplainMetrics_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_datastore_v1_PlanSummary_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_datastore_v1_PlanSummary_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_datastore_v1_ExecutionStats_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_datastore_v1_ExecutionStats_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\037google/api/field"
+ + "_behavior.proto\032\036google/protobuf/duratio"
+ + "n.proto\032\034google/protobuf/struct.proto\"&\n"
+ + "\016ExplainOptions\022\024\n\007analyze\030\001 \001(\010B\003\340A\001\"\206\001"
+ + "\n\016ExplainMetrics\0226\n\014plan_summary\030\001 \001(\0132 "
+ + ".google.datastore.v1.PlanSummary\022<\n\017exec"
+ + "ution_stats\030\002 \001(\0132#.google.datastore.v1."
+ + "ExecutionStats\"<\n\013PlanSummary\022-\n\014indexes"
+ + "_used\030\001 \003(\0132\027.google.protobuf.Struct\"\250\001\n"
+ + "\016ExecutionStats\022\030\n\020results_returned\030\001 \001("
+ + "\003\0225\n\022execution_duration\030\003 \001(\0132\031.google.p"
+ + "rotobuf.Duration\022\027\n\017read_operations\030\004 \001("
+ + "\003\022,\n\013debug_stats\030\005 \001(\0132\027.google.protobuf"
+ + ".StructB\303\001\n\027com.google.datastore.v1B\021Que"
+ + "ryProfileProtoP\001Z
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the explainOptions field is set.
+ */
+ @java.lang.Override
+ public boolean hasExplainOptions() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The explainOptions.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExplainOptions getExplainOptions() {
+ return explainOptions_ == null
+ ? com.google.datastore.v1.ExplainOptions.getDefaultInstance()
+ : explainOptions_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExplainOptionsOrBuilder getExplainOptionsOrBuilder() {
+ return explainOptions_ == null
+ ? com.google.datastore.v1.ExplainOptions.getDefaultInstance()
+ : explainOptions_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -466,6 +525,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 (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(11, getExplainOptions());
+ }
getUnknownFields().writeTo(output);
}
@@ -497,6 +559,9 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, databaseId_);
}
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExplainOptions());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -523,6 +588,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasReadOptions()) {
if (!getReadOptions().equals(other.getReadOptions())) return false;
}
+ if (hasExplainOptions() != other.hasExplainOptions()) return false;
+ if (hasExplainOptions()) {
+ if (!getExplainOptions().equals(other.getExplainOptions())) return false;
+ }
if (!getQueryTypeCase().equals(other.getQueryTypeCase())) return false;
switch (queryTypeCase_) {
case 3:
@@ -557,6 +626,10 @@ public int hashCode() {
hash = (37 * hash) + READ_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getReadOptions().hashCode();
}
+ if (hasExplainOptions()) {
+ hash = (37 * hash) + EXPLAIN_OPTIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getExplainOptions().hashCode();
+ }
switch (queryTypeCase_) {
case 3:
hash = (37 * hash) + AGGREGATION_QUERY_FIELD_NUMBER;
@@ -712,6 +785,7 @@ private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getPartitionIdFieldBuilder();
getReadOptionsFieldBuilder();
+ getExplainOptionsFieldBuilder();
}
}
@@ -737,6 +811,11 @@ public Builder clear() {
if (gqlQueryBuilder_ != null) {
gqlQueryBuilder_.clear();
}
+ explainOptions_ = null;
+ if (explainOptionsBuilder_ != null) {
+ explainOptionsBuilder_.dispose();
+ explainOptionsBuilder_ = null;
+ }
queryTypeCase_ = 0;
queryType_ = null;
return this;
@@ -793,6 +872,11 @@ private void buildPartial0(com.google.datastore.v1.RunAggregationQueryRequest re
readOptionsBuilder_ == null ? readOptions_ : readOptionsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.explainOptions_ =
+ explainOptionsBuilder_ == null ? explainOptions_ : explainOptionsBuilder_.build();
+ to_bitField0_ |= 0x00000004;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -869,6 +953,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunAggregationQueryRequest othe
if (other.hasReadOptions()) {
mergeReadOptions(other.getReadOptions());
}
+ if (other.hasExplainOptions()) {
+ mergeExplainOptions(other.getExplainOptions());
+ }
switch (other.getQueryTypeCase()) {
case AGGREGATION_QUERY:
{
@@ -948,6 +1035,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000002;
break;
} // case 74
+ case 90:
+ {
+ input.readMessage(getExplainOptionsFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 90
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -2020,6 +2113,219 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return gqlQueryBuilder_;
}
+ private com.google.datastore.v1.ExplainOptions explainOptions_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainOptions,
+ com.google.datastore.v1.ExplainOptions.Builder,
+ com.google.datastore.v1.ExplainOptionsOrBuilder>
+ explainOptionsBuilder_;
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the explainOptions field is set.
+ */
+ public boolean hasExplainOptions() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The explainOptions.
+ */
+ public com.google.datastore.v1.ExplainOptions getExplainOptions() {
+ if (explainOptionsBuilder_ == null) {
+ return explainOptions_ == null
+ ? com.google.datastore.v1.ExplainOptions.getDefaultInstance()
+ : explainOptions_;
+ } else {
+ return explainOptionsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setExplainOptions(com.google.datastore.v1.ExplainOptions value) {
+ if (explainOptionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ explainOptions_ = value;
+ } else {
+ explainOptionsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setExplainOptions(
+ com.google.datastore.v1.ExplainOptions.Builder builderForValue) {
+ if (explainOptionsBuilder_ == null) {
+ explainOptions_ = builderForValue.build();
+ } else {
+ explainOptionsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeExplainOptions(com.google.datastore.v1.ExplainOptions value) {
+ if (explainOptionsBuilder_ == null) {
+ if (((bitField0_ & 0x00000040) != 0)
+ && explainOptions_ != null
+ && explainOptions_ != com.google.datastore.v1.ExplainOptions.getDefaultInstance()) {
+ getExplainOptionsBuilder().mergeFrom(value);
+ } else {
+ explainOptions_ = value;
+ }
+ } else {
+ explainOptionsBuilder_.mergeFrom(value);
+ }
+ if (explainOptions_ != null) {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearExplainOptions() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ explainOptions_ = null;
+ if (explainOptionsBuilder_ != null) {
+ explainOptionsBuilder_.dispose();
+ explainOptionsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.ExplainOptions.Builder getExplainOptionsBuilder() {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return getExplainOptionsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.ExplainOptionsOrBuilder getExplainOptionsOrBuilder() {
+ if (explainOptionsBuilder_ != null) {
+ return explainOptionsBuilder_.getMessageOrBuilder();
+ } else {
+ return explainOptions_ == null
+ ? com.google.datastore.v1.ExplainOptions.getDefaultInstance()
+ : explainOptions_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainOptions,
+ com.google.datastore.v1.ExplainOptions.Builder,
+ com.google.datastore.v1.ExplainOptionsOrBuilder>
+ getExplainOptionsFieldBuilder() {
+ if (explainOptionsBuilder_ == null) {
+ explainOptionsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainOptions,
+ com.google.datastore.v1.ExplainOptions.Builder,
+ com.google.datastore.v1.ExplainOptionsOrBuilder>(
+ getExplainOptions(), getParentForChildren(), isClean());
+ explainOptions_ = null;
+ }
+ return explainOptionsBuilder_;
+ }
+
@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 0982b2b2b..23a5c4e62 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
@@ -229,5 +229,49 @@ public interface RunAggregationQueryRequestOrBuilder
*/
com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder();
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the explainOptions field is set.
+ */
+ boolean hasExplainOptions();
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The explainOptions.
+ */
+ com.google.datastore.v1.ExplainOptions getExplainOptions();
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.datastore.v1.ExplainOptionsOrBuilder getExplainOptionsOrBuilder();
+
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 f33cfc1af..9ddc2eb14 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
@@ -185,6 +185,62 @@ public com.google.protobuf.ByteString getTransaction() {
return transaction_;
}
+ public static final int EXPLAIN_METRICS_FIELD_NUMBER = 9;
+ private com.google.datastore.v1.ExplainMetrics explainMetrics_;
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return Whether the explainMetrics field is set.
+ */
+ @java.lang.Override
+ public boolean hasExplainMetrics() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return The explainMetrics.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExplainMetrics getExplainMetrics() {
+ return explainMetrics_ == null
+ ? com.google.datastore.v1.ExplainMetrics.getDefaultInstance()
+ : explainMetrics_;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExplainMetricsOrBuilder getExplainMetricsOrBuilder() {
+ return explainMetrics_ == null
+ ? com.google.datastore.v1.ExplainMetrics.getDefaultInstance()
+ : explainMetrics_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -208,6 +264,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!transaction_.isEmpty()) {
output.writeBytes(5, transaction_);
}
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(9, getExplainMetrics());
+ }
getUnknownFields().writeTo(output);
}
@@ -226,6 +285,9 @@ public int getSerializedSize() {
if (!transaction_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, transaction_);
}
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getExplainMetrics());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -251,6 +313,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getQuery().equals(other.getQuery())) return false;
}
if (!getTransaction().equals(other.getTransaction())) return false;
+ if (hasExplainMetrics() != other.hasExplainMetrics()) return false;
+ if (hasExplainMetrics()) {
+ if (!getExplainMetrics().equals(other.getExplainMetrics())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -272,6 +338,10 @@ public int hashCode() {
}
hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
hash = (53 * hash) + getTransaction().hashCode();
+ if (hasExplainMetrics()) {
+ hash = (37 * hash) + EXPLAIN_METRICS_FIELD_NUMBER;
+ hash = (53 * hash) + getExplainMetrics().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -415,6 +485,7 @@ private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getBatchFieldBuilder();
getQueryFieldBuilder();
+ getExplainMetricsFieldBuilder();
}
}
@@ -433,6 +504,11 @@ public Builder clear() {
queryBuilder_ = null;
}
transaction_ = com.google.protobuf.ByteString.EMPTY;
+ explainMetrics_ = null;
+ if (explainMetricsBuilder_ != null) {
+ explainMetricsBuilder_.dispose();
+ explainMetricsBuilder_ = null;
+ }
return this;
}
@@ -481,6 +557,11 @@ private void buildPartial0(com.google.datastore.v1.RunAggregationQueryResponse r
if (((from_bitField0_ & 0x00000004) != 0)) {
result.transaction_ = transaction_;
}
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.explainMetrics_ =
+ explainMetricsBuilder_ == null ? explainMetrics_ : explainMetricsBuilder_.build();
+ to_bitField0_ |= 0x00000004;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -539,6 +620,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunAggregationQueryResponse oth
if (other.getTransaction() != com.google.protobuf.ByteString.EMPTY) {
setTransaction(other.getTransaction());
}
+ if (other.hasExplainMetrics()) {
+ mergeExplainMetrics(other.getExplainMetrics());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -583,6 +667,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 42
+ case 74:
+ {
+ input.readMessage(getExplainMetricsFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 74
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1046,6 +1136,210 @@ public Builder clearTransaction() {
return this;
}
+ private com.google.datastore.v1.ExplainMetrics explainMetrics_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainMetrics,
+ com.google.datastore.v1.ExplainMetrics.Builder,
+ com.google.datastore.v1.ExplainMetricsOrBuilder>
+ explainMetricsBuilder_;
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return Whether the explainMetrics field is set.
+ */
+ public boolean hasExplainMetrics() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return The explainMetrics.
+ */
+ public com.google.datastore.v1.ExplainMetrics getExplainMetrics() {
+ if (explainMetricsBuilder_ == null) {
+ return explainMetrics_ == null
+ ? com.google.datastore.v1.ExplainMetrics.getDefaultInstance()
+ : explainMetrics_;
+ } else {
+ return explainMetricsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public Builder setExplainMetrics(com.google.datastore.v1.ExplainMetrics value) {
+ if (explainMetricsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ explainMetrics_ = value;
+ } else {
+ explainMetricsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public Builder setExplainMetrics(
+ com.google.datastore.v1.ExplainMetrics.Builder builderForValue) {
+ if (explainMetricsBuilder_ == null) {
+ explainMetrics_ = builderForValue.build();
+ } else {
+ explainMetricsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public Builder mergeExplainMetrics(com.google.datastore.v1.ExplainMetrics value) {
+ if (explainMetricsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)
+ && explainMetrics_ != null
+ && explainMetrics_ != com.google.datastore.v1.ExplainMetrics.getDefaultInstance()) {
+ getExplainMetricsBuilder().mergeFrom(value);
+ } else {
+ explainMetrics_ = value;
+ }
+ } else {
+ explainMetricsBuilder_.mergeFrom(value);
+ }
+ if (explainMetrics_ != null) {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public Builder clearExplainMetrics() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ explainMetrics_ = null;
+ if (explainMetricsBuilder_ != null) {
+ explainMetricsBuilder_.dispose();
+ explainMetricsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public com.google.datastore.v1.ExplainMetrics.Builder getExplainMetricsBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return getExplainMetricsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public com.google.datastore.v1.ExplainMetricsOrBuilder getExplainMetricsOrBuilder() {
+ if (explainMetricsBuilder_ != null) {
+ return explainMetricsBuilder_.getMessageOrBuilder();
+ } else {
+ return explainMetrics_ == null
+ ? com.google.datastore.v1.ExplainMetrics.getDefaultInstance()
+ : explainMetrics_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainMetrics,
+ com.google.datastore.v1.ExplainMetrics.Builder,
+ com.google.datastore.v1.ExplainMetricsOrBuilder>
+ getExplainMetricsFieldBuilder() {
+ if (explainMetricsBuilder_ == null) {
+ explainMetricsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainMetrics,
+ com.google.datastore.v1.ExplainMetrics.Builder,
+ com.google.datastore.v1.ExplainMetricsOrBuilder>(
+ getExplainMetrics(), getParentForChildren(), isClean());
+ explainMetrics_ = null;
+ }
+ return explainMetricsBuilder_;
+ }
+
@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 fc035ea99..423c26052 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
@@ -112,4 +112,45 @@ public interface RunAggregationQueryResponseOrBuilder
* @return The transaction.
*/
com.google.protobuf.ByteString getTransaction();
+
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return Whether the explainMetrics field is set.
+ */
+ boolean hasExplainMetrics();
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return The explainMetrics.
+ */
+ com.google.datastore.v1.ExplainMetrics getExplainMetrics();
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ com.google.datastore.v1.ExplainMetricsOrBuilder getExplainMetricsOrBuilder();
}
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 e6a745896..cdbc7b6fa 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
@@ -433,6 +433,65 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return com.google.datastore.v1.GqlQuery.getDefaultInstance();
}
+ public static final int EXPLAIN_OPTIONS_FIELD_NUMBER = 12;
+ private com.google.datastore.v1.ExplainOptions explainOptions_;
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the explainOptions field is set.
+ */
+ @java.lang.Override
+ public boolean hasExplainOptions() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The explainOptions.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExplainOptions getExplainOptions() {
+ return explainOptions_ == null
+ ? com.google.datastore.v1.ExplainOptions.getDefaultInstance()
+ : explainOptions_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExplainOptionsOrBuilder getExplainOptionsOrBuilder() {
+ return explainOptions_ == null
+ ? com.google.datastore.v1.ExplainOptions.getDefaultInstance()
+ : explainOptions_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -465,6 +524,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 (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(12, getExplainOptions());
+ }
getUnknownFields().writeTo(output);
}
@@ -496,6 +558,9 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, databaseId_);
}
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getExplainOptions());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -521,6 +586,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasReadOptions()) {
if (!getReadOptions().equals(other.getReadOptions())) return false;
}
+ if (hasExplainOptions() != other.hasExplainOptions()) return false;
+ if (hasExplainOptions()) {
+ if (!getExplainOptions().equals(other.getExplainOptions())) return false;
+ }
if (!getQueryTypeCase().equals(other.getQueryTypeCase())) return false;
switch (queryTypeCase_) {
case 3:
@@ -555,6 +624,10 @@ public int hashCode() {
hash = (37 * hash) + READ_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getReadOptions().hashCode();
}
+ if (hasExplainOptions()) {
+ hash = (37 * hash) + EXPLAIN_OPTIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getExplainOptions().hashCode();
+ }
switch (queryTypeCase_) {
case 3:
hash = (37 * hash) + QUERY_FIELD_NUMBER;
@@ -709,6 +782,7 @@ private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getPartitionIdFieldBuilder();
getReadOptionsFieldBuilder();
+ getExplainOptionsFieldBuilder();
}
}
@@ -734,6 +808,11 @@ public Builder clear() {
if (gqlQueryBuilder_ != null) {
gqlQueryBuilder_.clear();
}
+ explainOptions_ = null;
+ if (explainOptionsBuilder_ != null) {
+ explainOptionsBuilder_.dispose();
+ explainOptionsBuilder_ = null;
+ }
queryTypeCase_ = 0;
queryType_ = null;
return this;
@@ -790,6 +869,11 @@ private void buildPartial0(com.google.datastore.v1.RunQueryRequest result) {
readOptionsBuilder_ == null ? readOptions_ : readOptionsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.explainOptions_ =
+ explainOptionsBuilder_ == null ? explainOptions_ : explainOptionsBuilder_.build();
+ to_bitField0_ |= 0x00000004;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -865,6 +949,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunQueryRequest other) {
if (other.hasReadOptions()) {
mergeReadOptions(other.getReadOptions());
}
+ if (other.hasExplainOptions()) {
+ mergeExplainOptions(other.getExplainOptions());
+ }
switch (other.getQueryTypeCase()) {
case QUERY:
{
@@ -943,6 +1030,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000002;
break;
} // case 74
+ case 98:
+ {
+ input.readMessage(getExplainOptionsFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 98
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -2011,6 +2104,219 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return gqlQueryBuilder_;
}
+ private com.google.datastore.v1.ExplainOptions explainOptions_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainOptions,
+ com.google.datastore.v1.ExplainOptions.Builder,
+ com.google.datastore.v1.ExplainOptionsOrBuilder>
+ explainOptionsBuilder_;
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the explainOptions field is set.
+ */
+ public boolean hasExplainOptions() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The explainOptions.
+ */
+ public com.google.datastore.v1.ExplainOptions getExplainOptions() {
+ if (explainOptionsBuilder_ == null) {
+ return explainOptions_ == null
+ ? com.google.datastore.v1.ExplainOptions.getDefaultInstance()
+ : explainOptions_;
+ } else {
+ return explainOptionsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setExplainOptions(com.google.datastore.v1.ExplainOptions value) {
+ if (explainOptionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ explainOptions_ = value;
+ } else {
+ explainOptionsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setExplainOptions(
+ com.google.datastore.v1.ExplainOptions.Builder builderForValue) {
+ if (explainOptionsBuilder_ == null) {
+ explainOptions_ = builderForValue.build();
+ } else {
+ explainOptionsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeExplainOptions(com.google.datastore.v1.ExplainOptions value) {
+ if (explainOptionsBuilder_ == null) {
+ if (((bitField0_ & 0x00000040) != 0)
+ && explainOptions_ != null
+ && explainOptions_ != com.google.datastore.v1.ExplainOptions.getDefaultInstance()) {
+ getExplainOptionsBuilder().mergeFrom(value);
+ } else {
+ explainOptions_ = value;
+ }
+ } else {
+ explainOptionsBuilder_.mergeFrom(value);
+ }
+ if (explainOptions_ != null) {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearExplainOptions() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ explainOptions_ = null;
+ if (explainOptionsBuilder_ != null) {
+ explainOptionsBuilder_.dispose();
+ explainOptionsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.ExplainOptions.Builder getExplainOptionsBuilder() {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return getExplainOptionsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.ExplainOptionsOrBuilder getExplainOptionsOrBuilder() {
+ if (explainOptionsBuilder_ != null) {
+ return explainOptionsBuilder_.getMessageOrBuilder();
+ } else {
+ return explainOptions_ == null
+ ? com.google.datastore.v1.ExplainOptions.getDefaultInstance()
+ : explainOptions_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainOptions,
+ com.google.datastore.v1.ExplainOptions.Builder,
+ com.google.datastore.v1.ExplainOptionsOrBuilder>
+ getExplainOptionsFieldBuilder() {
+ if (explainOptionsBuilder_ == null) {
+ explainOptionsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainOptions,
+ com.google.datastore.v1.ExplainOptions.Builder,
+ com.google.datastore.v1.ExplainOptionsOrBuilder>(
+ getExplainOptions(), getParentForChildren(), isClean());
+ explainOptions_ = null;
+ }
+ return explainOptionsBuilder_;
+ }
+
@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 b11ecd648..d94ba46d2 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
@@ -229,5 +229,49 @@ public interface RunQueryRequestOrBuilder
*/
com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder();
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the explainOptions field is set.
+ */
+ boolean hasExplainOptions();
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The explainOptions.
+ */
+ com.google.datastore.v1.ExplainOptions getExplainOptions();
+ /**
+ *
+ *
+ * + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + *+ * + *
+ * .google.datastore.v1.ExplainOptions explain_options = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.datastore.v1.ExplainOptionsOrBuilder getExplainOptionsOrBuilder();
+
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 f4852c6a8..338b81c10 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
@@ -181,6 +181,62 @@ public com.google.protobuf.ByteString getTransaction() {
return transaction_;
}
+ public static final int EXPLAIN_METRICS_FIELD_NUMBER = 9;
+ private com.google.datastore.v1.ExplainMetrics explainMetrics_;
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return Whether the explainMetrics field is set.
+ */
+ @java.lang.Override
+ public boolean hasExplainMetrics() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return The explainMetrics.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExplainMetrics getExplainMetrics() {
+ return explainMetrics_ == null
+ ? com.google.datastore.v1.ExplainMetrics.getDefaultInstance()
+ : explainMetrics_;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ExplainMetricsOrBuilder getExplainMetricsOrBuilder() {
+ return explainMetrics_ == null
+ ? com.google.datastore.v1.ExplainMetrics.getDefaultInstance()
+ : explainMetrics_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -204,6 +260,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!transaction_.isEmpty()) {
output.writeBytes(5, transaction_);
}
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(9, getExplainMetrics());
+ }
getUnknownFields().writeTo(output);
}
@@ -222,6 +281,9 @@ public int getSerializedSize() {
if (!transaction_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, transaction_);
}
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getExplainMetrics());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -246,6 +308,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getQuery().equals(other.getQuery())) return false;
}
if (!getTransaction().equals(other.getTransaction())) return false;
+ if (hasExplainMetrics() != other.hasExplainMetrics()) return false;
+ if (hasExplainMetrics()) {
+ if (!getExplainMetrics().equals(other.getExplainMetrics())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -267,6 +333,10 @@ public int hashCode() {
}
hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
hash = (53 * hash) + getTransaction().hashCode();
+ if (hasExplainMetrics()) {
+ hash = (37 * hash) + EXPLAIN_METRICS_FIELD_NUMBER;
+ hash = (53 * hash) + getExplainMetrics().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -410,6 +480,7 @@ private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getBatchFieldBuilder();
getQueryFieldBuilder();
+ getExplainMetricsFieldBuilder();
}
}
@@ -428,6 +499,11 @@ public Builder clear() {
queryBuilder_ = null;
}
transaction_ = com.google.protobuf.ByteString.EMPTY;
+ explainMetrics_ = null;
+ if (explainMetricsBuilder_ != null) {
+ explainMetricsBuilder_.dispose();
+ explainMetricsBuilder_ = null;
+ }
return this;
}
@@ -476,6 +552,11 @@ private void buildPartial0(com.google.datastore.v1.RunQueryResponse result) {
if (((from_bitField0_ & 0x00000004) != 0)) {
result.transaction_ = transaction_;
}
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.explainMetrics_ =
+ explainMetricsBuilder_ == null ? explainMetrics_ : explainMetricsBuilder_.build();
+ to_bitField0_ |= 0x00000004;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -533,6 +614,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunQueryResponse other) {
if (other.getTransaction() != com.google.protobuf.ByteString.EMPTY) {
setTransaction(other.getTransaction());
}
+ if (other.hasExplainMetrics()) {
+ mergeExplainMetrics(other.getExplainMetrics());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -577,6 +661,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 42
+ case 74:
+ {
+ input.readMessage(getExplainMetricsFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 74
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1035,6 +1125,210 @@ public Builder clearTransaction() {
return this;
}
+ private com.google.datastore.v1.ExplainMetrics explainMetrics_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainMetrics,
+ com.google.datastore.v1.ExplainMetrics.Builder,
+ com.google.datastore.v1.ExplainMetricsOrBuilder>
+ explainMetricsBuilder_;
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return Whether the explainMetrics field is set.
+ */
+ public boolean hasExplainMetrics() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return The explainMetrics.
+ */
+ public com.google.datastore.v1.ExplainMetrics getExplainMetrics() {
+ if (explainMetricsBuilder_ == null) {
+ return explainMetrics_ == null
+ ? com.google.datastore.v1.ExplainMetrics.getDefaultInstance()
+ : explainMetrics_;
+ } else {
+ return explainMetricsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public Builder setExplainMetrics(com.google.datastore.v1.ExplainMetrics value) {
+ if (explainMetricsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ explainMetrics_ = value;
+ } else {
+ explainMetricsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public Builder setExplainMetrics(
+ com.google.datastore.v1.ExplainMetrics.Builder builderForValue) {
+ if (explainMetricsBuilder_ == null) {
+ explainMetrics_ = builderForValue.build();
+ } else {
+ explainMetricsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public Builder mergeExplainMetrics(com.google.datastore.v1.ExplainMetrics value) {
+ if (explainMetricsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)
+ && explainMetrics_ != null
+ && explainMetrics_ != com.google.datastore.v1.ExplainMetrics.getDefaultInstance()) {
+ getExplainMetricsBuilder().mergeFrom(value);
+ } else {
+ explainMetrics_ = value;
+ }
+ } else {
+ explainMetricsBuilder_.mergeFrom(value);
+ }
+ if (explainMetrics_ != null) {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public Builder clearExplainMetrics() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ explainMetrics_ = null;
+ if (explainMetricsBuilder_ != null) {
+ explainMetricsBuilder_.dispose();
+ explainMetricsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public com.google.datastore.v1.ExplainMetrics.Builder getExplainMetricsBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return getExplainMetricsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ public com.google.datastore.v1.ExplainMetricsOrBuilder getExplainMetricsOrBuilder() {
+ if (explainMetricsBuilder_ != null) {
+ return explainMetricsBuilder_.getMessageOrBuilder();
+ } else {
+ return explainMetrics_ == null
+ ? com.google.datastore.v1.ExplainMetrics.getDefaultInstance()
+ : explainMetrics_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainMetrics,
+ com.google.datastore.v1.ExplainMetrics.Builder,
+ com.google.datastore.v1.ExplainMetricsOrBuilder>
+ getExplainMetricsFieldBuilder() {
+ if (explainMetricsBuilder_ == null) {
+ explainMetricsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ExplainMetrics,
+ com.google.datastore.v1.ExplainMetrics.Builder,
+ com.google.datastore.v1.ExplainMetricsOrBuilder>(
+ getExplainMetrics(), getParentForChildren(), isClean());
+ explainMetrics_ = null;
+ }
+ return explainMetricsBuilder_;
+ }
+
@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 53de7bf14..3bcbb324e 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
@@ -112,4 +112,45 @@ public interface RunQueryResponseOrBuilder
* @return The transaction.
*/
com.google.protobuf.ByteString getTransaction();
+
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return Whether the explainMetrics field is set.
+ */
+ boolean hasExplainMetrics();
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ *
+ * @return The explainMetrics.
+ */
+ com.google.datastore.v1.ExplainMetrics getExplainMetrics();
+ /**
+ *
+ *
+ * + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + *+ * + *
.google.datastore.v1.ExplainMetrics explain_metrics = 9;
+ */
+ com.google.datastore.v1.ExplainMetricsOrBuilder getExplainMetricsOrBuilder();
}
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..1a3fbdd11 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,10 @@ message RunQueryRequest {
// The GQL query to run. This query must be a non-aggregation query.
GqlQuery gql_query = 7;
}
+
+ // Optional. Explain options for the query. If set, additional query
+ // statistics will be returned. If not, only query results will be returned.
+ ExplainOptions explain_options = 12 [(google.api.field_behavior) = OPTIONAL];
}
// The response for
@@ -251,6 +256,11 @@ message RunQueryResponse {
// was set in
// [RunQueryRequest.read_options][google.datastore.v1.RunQueryRequest.read_options].
bytes transaction = 5;
+
+ // Query explain metrics. This is only present when the
+ // [RunQueryRequest.explain_options][google.datastore.v1.RunQueryRequest.explain_options]
+ // is provided, and it is sent only once with the last response in the stream.
+ ExplainMetrics explain_metrics = 9;
}
// The request for
@@ -282,6 +292,10 @@ message RunAggregationQueryRequest {
// The GQL query to run. This query must be an aggregation query.
GqlQuery gql_query = 7;
}
+
+ // Optional. Explain options for the query. If set, additional query
+ // statistics will be returned. If not, only query results will be returned.
+ ExplainOptions explain_options = 11 [(google.api.field_behavior) = OPTIONAL];
}
// The response for
@@ -301,6 +315,11 @@ message RunAggregationQueryResponse {
// was set in
// [RunAggregationQueryRequest.read_options][google.datastore.v1.RunAggregationQueryRequest.read_options].
bytes transaction = 5;
+
+ // Query explain metrics. This is only present when the
+ // [RunAggregationQueryRequest.explain_options][google.datastore.v1.RunAggregationQueryRequest.explain_options]
+ // is provided, and it is sent only once with the last response in the stream.
+ ExplainMetrics explain_metrics = 9;
}
// 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..01c9fc254
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query_profile.proto
@@ -0,0 +1,91 @@
+// 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/api/field_behavior.proto";
+import "google/protobuf/duration.proto";
+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.
+
+// Explain options for the query.
+message ExplainOptions {
+ // Optional. Whether to execute this query.
+ //
+ // When false (the default), the query will be planned, returning only
+ // metrics from the planning stages.
+ //
+ // When true, the query will be planned and executed, returning the full
+ // query results along with both planning and execution stage metrics.
+ bool analyze = 1 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Explain metrics for the query.
+message ExplainMetrics {
+ // Planning phase information for the query.
+ PlanSummary plan_summary = 1;
+
+ // Aggregated stats from the execution of the query. Only present when
+ // [ExplainOptions.analyze][google.datastore.v1.ExplainOptions.analyze] is set
+ // to true.
+ ExecutionStats execution_stats = 2;
+}
+
+// Planning phase information for the query.
+message PlanSummary {
+ // The indexes selected for the query. For example:
+ // [
+ // {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"},
+ // {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"}
+ // ]
+ repeated google.protobuf.Struct indexes_used = 1;
+}
+
+// Execution statistics for the query.
+message ExecutionStats {
+ // Total number of results returned, including documents, projections,
+ // aggregation results, keys.
+ int64 results_returned = 1;
+
+ // Total time to execute the query in the backend.
+ google.protobuf.Duration execution_duration = 3;
+
+ // Total billable read operations.
+ int64 read_operations = 4;
+
+ // Debugging statistics from the execution of the query. Note that the
+ // debugging stats are subject to change as Firestore evolves. It could
+ // include:
+ // {
+ // "indexes_entries_scanned": "1000",
+ // "documents_scanned": "20",
+ // "billing_details" : {
+ // "documents_billable": "20",
+ // "index_entries_billable": "1000",
+ // "min_query_cost": "0"
+ // }
+ // }
+ google.protobuf.Struct debug_stats = 5;
+}
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index c7eab8dfa..58d7e4c34 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@