getKeysBuilderList()
return keysBuilder_;
}
+ private com.google.datastore.v1.PropertyMask propertyMask_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>
+ propertyMaskBuilder_;
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ *
+ * @return Whether the propertyMask field is set.
+ */
+ public boolean hasPropertyMask() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ *
+ * @return The propertyMask.
+ */
+ public com.google.datastore.v1.PropertyMask getPropertyMask() {
+ if (propertyMaskBuilder_ == null) {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ } else {
+ return propertyMaskBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ */
+ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask value) {
+ if (propertyMaskBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ propertyMask_ = value;
+ } else {
+ propertyMaskBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ */
+ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask.Builder builderForValue) {
+ if (propertyMaskBuilder_ == null) {
+ propertyMask_ = builderForValue.build();
+ } else {
+ propertyMaskBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ */
+ public Builder mergePropertyMask(com.google.datastore.v1.PropertyMask value) {
+ if (propertyMaskBuilder_ == null) {
+ if (((bitField0_ & 0x00000010) != 0)
+ && propertyMask_ != null
+ && propertyMask_ != com.google.datastore.v1.PropertyMask.getDefaultInstance()) {
+ getPropertyMaskBuilder().mergeFrom(value);
+ } else {
+ propertyMask_ = value;
+ }
+ } else {
+ propertyMaskBuilder_.mergeFrom(value);
+ }
+ if (propertyMask_ != null) {
+ bitField0_ |= 0x00000010;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ */
+ public Builder clearPropertyMask() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ propertyMask_ = null;
+ if (propertyMaskBuilder_ != null) {
+ propertyMaskBuilder_.dispose();
+ propertyMaskBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ */
+ public com.google.datastore.v1.PropertyMask.Builder getPropertyMaskBuilder() {
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return getPropertyMaskFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ */
+ public com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder() {
+ if (propertyMaskBuilder_ != null) {
+ return propertyMaskBuilder_.getMessageOrBuilder();
+ } else {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>
+ getPropertyMaskFieldBuilder() {
+ if (propertyMaskBuilder_ == null) {
+ propertyMaskBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>(
+ getPropertyMask(), getParentForChildren(), isClean());
+ propertyMask_ = null;
+ }
+ return propertyMaskBuilder_;
+ }
+
@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/LookupRequestOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupRequestOrBuilder.java
index 82fe24661..d343eeca4 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupRequestOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/LookupRequestOrBuilder.java
@@ -170,4 +170,54 @@ public interface LookupRequestOrBuilder
*
*/
com.google.datastore.v1.KeyOrBuilder getKeysOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ *
+ * @return Whether the propertyMask field is set.
+ */
+ boolean hasPropertyMask();
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ *
+ * @return The propertyMask.
+ */
+ com.google.datastore.v1.PropertyMask getPropertyMask();
+ /**
+ *
+ *
+ *
+ * The properties to return. Defaults to returning all properties.
+ *
+ * If this field is set and an entity has a property not referenced in the
+ * mask, it will be absent from [LookupResponse.found.entity.properties][].
+ *
+ * The entity's key is always returned.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 5;
+ */
+ com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder();
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java
index 91895d180..6857d48a6 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java
@@ -60,6 +60,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
com.google.datastore.v1.Mutation.class, com.google.datastore.v1.Mutation.Builder.class);
}
+ private int bitField0_;
private int operationCase_ = 0;
@SuppressWarnings("serial")
@@ -476,6 +477,77 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
return com.google.protobuf.Timestamp.getDefaultInstance();
}
+ public static final int PROPERTY_MASK_FIELD_NUMBER = 9;
+ private com.google.datastore.v1.PropertyMask propertyMask_;
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ *
+ * @return Whether the propertyMask field is set.
+ */
+ @java.lang.Override
+ public boolean hasPropertyMask() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ *
+ * @return The propertyMask.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyMask getPropertyMask() {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder() {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -505,6 +577,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (conflictDetectionStrategyCase_ == 8) {
output.writeInt64(8, (long) ((java.lang.Long) conflictDetectionStrategy_));
}
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(9, getPropertyMask());
+ }
if (conflictDetectionStrategyCase_ == 11) {
output.writeMessage(11, (com.google.protobuf.Timestamp) conflictDetectionStrategy_);
}
@@ -542,6 +617,9 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeInt64Size(
8, (long) ((java.lang.Long) conflictDetectionStrategy_));
}
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getPropertyMask());
+ }
if (conflictDetectionStrategyCase_ == 11) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
@@ -562,6 +640,10 @@ public boolean equals(final java.lang.Object obj) {
}
com.google.datastore.v1.Mutation other = (com.google.datastore.v1.Mutation) obj;
+ if (hasPropertyMask() != other.hasPropertyMask()) return false;
+ if (hasPropertyMask()) {
+ if (!getPropertyMask().equals(other.getPropertyMask())) return false;
+ }
if (!getOperationCase().equals(other.getOperationCase())) return false;
switch (operationCase_) {
case 4:
@@ -602,6 +684,10 @@ public int hashCode() {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasPropertyMask()) {
+ hash = (37 * hash) + PROPERTY_MASK_FIELD_NUMBER;
+ hash = (53 * hash) + getPropertyMask().hashCode();
+ }
switch (operationCase_) {
case 4:
hash = (37 * hash) + INSERT_FIELD_NUMBER;
@@ -762,10 +848,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.datastore.v1.Mutation.newBuilder()
- private Builder() {}
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+ getPropertyMaskFieldBuilder();
+ }
}
@java.lang.Override
@@ -787,6 +882,11 @@ public Builder clear() {
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.clear();
}
+ propertyMask_ = null;
+ if (propertyMaskBuilder_ != null) {
+ propertyMaskBuilder_.dispose();
+ propertyMaskBuilder_ = null;
+ }
operationCase_ = 0;
operation_ = null;
conflictDetectionStrategyCase_ = 0;
@@ -827,6 +927,13 @@ public com.google.datastore.v1.Mutation buildPartial() {
private void buildPartial0(com.google.datastore.v1.Mutation result) {
int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.propertyMask_ =
+ propertyMaskBuilder_ == null ? propertyMask_ : propertyMaskBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.datastore.v1.Mutation result) {
@@ -896,6 +1003,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
public Builder mergeFrom(com.google.datastore.v1.Mutation other) {
if (other == com.google.datastore.v1.Mutation.getDefaultInstance()) return this;
+ if (other.hasPropertyMask()) {
+ mergePropertyMask(other.getPropertyMask());
+ }
switch (other.getOperationCase()) {
case INSERT:
{
@@ -994,6 +1104,12 @@ public Builder mergeFrom(
conflictDetectionStrategyCase_ = 8;
break;
} // case 64
+ case 74:
+ {
+ input.readMessage(getPropertyMaskFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 74
case 90:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
@@ -2206,6 +2322,254 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
return updateTimeBuilder_;
}
+ private com.google.datastore.v1.PropertyMask propertyMask_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>
+ propertyMaskBuilder_;
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ *
+ * @return Whether the propertyMask field is set.
+ */
+ public boolean hasPropertyMask() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ *
+ * @return The propertyMask.
+ */
+ public com.google.datastore.v1.PropertyMask getPropertyMask() {
+ if (propertyMaskBuilder_ == null) {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ } else {
+ return propertyMaskBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask value) {
+ if (propertyMaskBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ propertyMask_ = value;
+ } else {
+ propertyMaskBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask.Builder builderForValue) {
+ if (propertyMaskBuilder_ == null) {
+ propertyMask_ = builderForValue.build();
+ } else {
+ propertyMaskBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ public Builder mergePropertyMask(com.google.datastore.v1.PropertyMask value) {
+ if (propertyMaskBuilder_ == null) {
+ if (((bitField0_ & 0x00000040) != 0)
+ && propertyMask_ != null
+ && propertyMask_ != com.google.datastore.v1.PropertyMask.getDefaultInstance()) {
+ getPropertyMaskBuilder().mergeFrom(value);
+ } else {
+ propertyMask_ = value;
+ }
+ } else {
+ propertyMaskBuilder_.mergeFrom(value);
+ }
+ if (propertyMask_ != null) {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ public Builder clearPropertyMask() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ propertyMask_ = null;
+ if (propertyMaskBuilder_ != null) {
+ propertyMaskBuilder_.dispose();
+ propertyMaskBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ public com.google.datastore.v1.PropertyMask.Builder getPropertyMaskBuilder() {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return getPropertyMaskFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ public com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder() {
+ if (propertyMaskBuilder_ != null) {
+ return propertyMaskBuilder_.getMessageOrBuilder();
+ } else {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>
+ getPropertyMaskFieldBuilder() {
+ if (propertyMaskBuilder_ == null) {
+ propertyMaskBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>(
+ getPropertyMask(), getParentForChildren(), isClean());
+ propertyMask_ = null;
+ }
+ return propertyMaskBuilder_;
+ }
+
@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/MutationOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationOrBuilder.java
index e833ed942..e051e6003 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationOrBuilder.java
@@ -246,6 +246,62 @@ public interface MutationOrBuilder
*/
com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder();
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ *
+ * @return Whether the propertyMask field is set.
+ */
+ boolean hasPropertyMask();
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ *
+ * @return The propertyMask.
+ */
+ com.google.datastore.v1.PropertyMask getPropertyMask();
+ /**
+ *
+ *
+ *
+ * The properties to write in this mutation.
+ * None of the properties in the mask may have a reserved name, except for
+ * `__key__`.
+ * This field is ignored for `delete`.
+ *
+ * If the entity already exists, only properties referenced in the mask are
+ * updated, others are left untouched.
+ * Properties referenced in the mask but not in the entity are deleted.
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 9;
+ */
+ com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder();
+
com.google.datastore.v1.Mutation.OperationCase getOperationCase();
com.google.datastore.v1.Mutation.ConflictDetectionStrategyCase getConflictDetectionStrategyCase();
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyMask.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyMask.java
new file mode 100644
index 000000000..2d9c2caf6
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyMask.java
@@ -0,0 +1,848 @@
+/*
+ * 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/datastore.proto
+
+// Protobuf Java Version: 3.25.3
+package com.google.datastore.v1;
+
+/**
+ *
+ *
+ *
+ * The set of arbitrarily nested property paths used to restrict an operation to
+ * only a subset of properties in an entity.
+ *
+ *
+ * Protobuf type {@code google.datastore.v1.PropertyMask}
+ */
+public final class PropertyMask extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.datastore.v1.PropertyMask)
+ PropertyMaskOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use PropertyMask.newBuilder() to construct.
+ private PropertyMask(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private PropertyMask() {
+ paths_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new PropertyMask();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.datastore.v1.DatastoreProto
+ .internal_static_google_datastore_v1_PropertyMask_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.datastore.v1.DatastoreProto
+ .internal_static_google_datastore_v1_PropertyMask_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.datastore.v1.PropertyMask.class,
+ com.google.datastore.v1.PropertyMask.Builder.class);
+ }
+
+ public static final int PATHS_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList paths_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @return A list containing the paths.
+ */
+ public com.google.protobuf.ProtocolStringList getPathsList() {
+ return paths_;
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @return The count of paths.
+ */
+ public int getPathsCount() {
+ return paths_.size();
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The paths at the given index.
+ */
+ public java.lang.String getPaths(int index) {
+ return paths_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the paths at the given index.
+ */
+ public com.google.protobuf.ByteString getPathsBytes(int index) {
+ return paths_.getByteString(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 < paths_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, paths_.getRaw(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < paths_.size(); i++) {
+ dataSize += computeStringSizeNoTag(paths_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getPathsList().size();
+ }
+ 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.PropertyMask)) {
+ return super.equals(obj);
+ }
+ com.google.datastore.v1.PropertyMask other = (com.google.datastore.v1.PropertyMask) obj;
+
+ if (!getPathsList().equals(other.getPathsList())) 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 (getPathsCount() > 0) {
+ hash = (37 * hash) + PATHS_FIELD_NUMBER;
+ hash = (53 * hash) + getPathsList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.datastore.v1.PropertyMask parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PropertyMask 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.PropertyMask parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PropertyMask 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.PropertyMask parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PropertyMask parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.PropertyMask parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PropertyMask 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.PropertyMask parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PropertyMask 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.PropertyMask parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PropertyMask 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.PropertyMask 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;
+ }
+ /**
+ *
+ *
+ *
+ * The set of arbitrarily nested property paths used to restrict an operation to
+ * only a subset of properties in an entity.
+ *
+ *
+ * Protobuf type {@code google.datastore.v1.PropertyMask}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.datastore.v1.PropertyMask)
+ com.google.datastore.v1.PropertyMaskOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.datastore.v1.DatastoreProto
+ .internal_static_google_datastore_v1_PropertyMask_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.datastore.v1.DatastoreProto
+ .internal_static_google_datastore_v1_PropertyMask_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.datastore.v1.PropertyMask.class,
+ com.google.datastore.v1.PropertyMask.Builder.class);
+ }
+
+ // Construct using com.google.datastore.v1.PropertyMask.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ paths_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.datastore.v1.DatastoreProto
+ .internal_static_google_datastore_v1_PropertyMask_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyMask getDefaultInstanceForType() {
+ return com.google.datastore.v1.PropertyMask.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyMask build() {
+ com.google.datastore.v1.PropertyMask result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyMask buildPartial() {
+ com.google.datastore.v1.PropertyMask result = new com.google.datastore.v1.PropertyMask(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.datastore.v1.PropertyMask result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ paths_.makeImmutable();
+ result.paths_ = paths_;
+ }
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.datastore.v1.PropertyMask) {
+ return mergeFrom((com.google.datastore.v1.PropertyMask) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.datastore.v1.PropertyMask other) {
+ if (other == com.google.datastore.v1.PropertyMask.getDefaultInstance()) return this;
+ if (!other.paths_.isEmpty()) {
+ if (paths_.isEmpty()) {
+ paths_ = other.paths_;
+ bitField0_ |= 0x00000001;
+ } else {
+ ensurePathsIsMutable();
+ paths_.addAll(other.paths_);
+ }
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+ ensurePathsIsMutable();
+ paths_.add(s);
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private com.google.protobuf.LazyStringArrayList paths_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ private void ensurePathsIsMutable() {
+ if (!paths_.isModifiable()) {
+ paths_ = new com.google.protobuf.LazyStringArrayList(paths_);
+ }
+ bitField0_ |= 0x00000001;
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @return A list containing the paths.
+ */
+ public com.google.protobuf.ProtocolStringList getPathsList() {
+ paths_.makeImmutable();
+ return paths_;
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @return The count of paths.
+ */
+ public int getPathsCount() {
+ return paths_.size();
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The paths at the given index.
+ */
+ public java.lang.String getPaths(int index) {
+ return paths_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the paths at the given index.
+ */
+ public com.google.protobuf.ByteString getPathsBytes(int index) {
+ return paths_.getByteString(index);
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param index The index to set the value at.
+ * @param value The paths to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPaths(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePathsIsMutable();
+ paths_.set(index, value);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param value The paths to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPaths(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePathsIsMutable();
+ paths_.add(value);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param values The paths to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllPaths(java.lang.Iterable values) {
+ ensurePathsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, paths_);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPaths() {
+ paths_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ ;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param value The bytes of the paths to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPathsBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensurePathsIsMutable();
+ paths_.add(value);
+ bitField0_ |= 0x00000001;
+ 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.PropertyMask)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.datastore.v1.PropertyMask)
+ private static final com.google.datastore.v1.PropertyMask DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.datastore.v1.PropertyMask();
+ }
+
+ public static com.google.datastore.v1.PropertyMask getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public PropertyMask parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyMask getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyMaskOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyMaskOrBuilder.java
new file mode 100644
index 000000000..8711d5d8a
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyMaskOrBuilder.java
@@ -0,0 +1,117 @@
+/*
+ * 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/datastore.proto
+
+// Protobuf Java Version: 3.25.3
+package com.google.datastore.v1;
+
+public interface PropertyMaskOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.datastore.v1.PropertyMask)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @return A list containing the paths.
+ */
+ java.util.List getPathsList();
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @return The count of paths.
+ */
+ int getPathsCount();
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The paths at the given index.
+ */
+ java.lang.String getPaths(int index);
+ /**
+ *
+ *
+ *
+ * The paths to the properties covered by this mask.
+ *
+ * A path is a list of property names separated by dots (`.`), for example
+ * `foo.bar` means the property `bar` inside the entity property `foo` inside
+ * the entity associated with this path.
+ *
+ * If a property name contains a dot `.` or a backslash `\`, then that
+ * name must be escaped.
+ *
+ * A path must not be empty, and may not reference a value inside an
+ * [array value][google.datastore.v1.Value.array_value].
+ *
+ *
+ * repeated string paths = 1;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the paths at the given index.
+ */
+ com.google.protobuf.ByteString getPathsBytes(int index);
+}
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 4420d5779..55691ceae 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,68 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return com.google.datastore.v1.GqlQuery.getDefaultInstance();
}
+ public static final int PROPERTY_MASK_FIELD_NUMBER = 10;
+ private com.google.datastore.v1.PropertyMask propertyMask_;
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ *
+ * @return Whether the propertyMask field is set.
+ */
+ @java.lang.Override
+ public boolean hasPropertyMask() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ *
+ * @return The propertyMask.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyMask getPropertyMask() {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder() {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ }
+
public static final int EXPLAIN_OPTIONS_FIELD_NUMBER = 12;
private com.google.datastore.v1.ExplainOptions explainOptions_;
/**
@@ -451,7 +513,7 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
*/
@java.lang.Override
public boolean hasExplainOptions() {
- return ((bitField0_ & 0x00000004) != 0);
+ return ((bitField0_ & 0x00000008) != 0);
}
/**
*
@@ -525,6 +587,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, databaseId_);
}
if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(10, getPropertyMask());
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(12, getExplainOptions());
}
getUnknownFields().writeTo(output);
@@ -559,6 +624,9 @@ public int getSerializedSize() {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, databaseId_);
}
if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getPropertyMask());
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getExplainOptions());
}
size += getUnknownFields().getSerializedSize();
@@ -586,6 +654,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasReadOptions()) {
if (!getReadOptions().equals(other.getReadOptions())) return false;
}
+ if (hasPropertyMask() != other.hasPropertyMask()) return false;
+ if (hasPropertyMask()) {
+ if (!getPropertyMask().equals(other.getPropertyMask())) return false;
+ }
if (hasExplainOptions() != other.hasExplainOptions()) return false;
if (hasExplainOptions()) {
if (!getExplainOptions().equals(other.getExplainOptions())) return false;
@@ -624,6 +696,10 @@ public int hashCode() {
hash = (37 * hash) + READ_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getReadOptions().hashCode();
}
+ if (hasPropertyMask()) {
+ hash = (37 * hash) + PROPERTY_MASK_FIELD_NUMBER;
+ hash = (53 * hash) + getPropertyMask().hashCode();
+ }
if (hasExplainOptions()) {
hash = (37 * hash) + EXPLAIN_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getExplainOptions().hashCode();
@@ -782,6 +858,7 @@ private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getPartitionIdFieldBuilder();
getReadOptionsFieldBuilder();
+ getPropertyMaskFieldBuilder();
getExplainOptionsFieldBuilder();
}
}
@@ -808,6 +885,11 @@ public Builder clear() {
if (gqlQueryBuilder_ != null) {
gqlQueryBuilder_.clear();
}
+ propertyMask_ = null;
+ if (propertyMaskBuilder_ != null) {
+ propertyMaskBuilder_.dispose();
+ propertyMaskBuilder_ = null;
+ }
explainOptions_ = null;
if (explainOptionsBuilder_ != null) {
explainOptionsBuilder_.dispose();
@@ -870,9 +952,14 @@ private void buildPartial0(com.google.datastore.v1.RunQueryRequest result) {
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.propertyMask_ =
+ propertyMaskBuilder_ == null ? propertyMask_ : propertyMaskBuilder_.build();
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
result.explainOptions_ =
explainOptionsBuilder_ == null ? explainOptions_ : explainOptionsBuilder_.build();
- to_bitField0_ |= 0x00000004;
+ to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@@ -949,6 +1036,9 @@ public Builder mergeFrom(com.google.datastore.v1.RunQueryRequest other) {
if (other.hasReadOptions()) {
mergeReadOptions(other.getReadOptions());
}
+ if (other.hasPropertyMask()) {
+ mergePropertyMask(other.getPropertyMask());
+ }
if (other.hasExplainOptions()) {
mergeExplainOptions(other.getExplainOptions());
}
@@ -1030,10 +1120,16 @@ public Builder mergeFrom(
bitField0_ |= 0x00000002;
break;
} // case 74
+ case 82:
+ {
+ input.readMessage(getPropertyMaskFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 82
case 98:
{
input.readMessage(getExplainOptionsFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
break;
} // case 98
default:
@@ -2104,6 +2200,227 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
return gqlQueryBuilder_;
}
+ private com.google.datastore.v1.PropertyMask propertyMask_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>
+ propertyMaskBuilder_;
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ *
+ * @return Whether the propertyMask field is set.
+ */
+ public boolean hasPropertyMask() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ *
+ * @return The propertyMask.
+ */
+ public com.google.datastore.v1.PropertyMask getPropertyMask() {
+ if (propertyMaskBuilder_ == null) {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ } else {
+ return propertyMaskBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask value) {
+ if (propertyMaskBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ propertyMask_ = value;
+ } else {
+ propertyMaskBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask.Builder builderForValue) {
+ if (propertyMaskBuilder_ == null) {
+ propertyMask_ = builderForValue.build();
+ } else {
+ propertyMaskBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ public Builder mergePropertyMask(com.google.datastore.v1.PropertyMask value) {
+ if (propertyMaskBuilder_ == null) {
+ if (((bitField0_ & 0x00000040) != 0)
+ && propertyMask_ != null
+ && propertyMask_ != com.google.datastore.v1.PropertyMask.getDefaultInstance()) {
+ getPropertyMaskBuilder().mergeFrom(value);
+ } else {
+ propertyMask_ = value;
+ }
+ } else {
+ propertyMaskBuilder_.mergeFrom(value);
+ }
+ if (propertyMask_ != null) {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ public Builder clearPropertyMask() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ propertyMask_ = null;
+ if (propertyMaskBuilder_ != null) {
+ propertyMaskBuilder_.dispose();
+ propertyMaskBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ public com.google.datastore.v1.PropertyMask.Builder getPropertyMaskBuilder() {
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return getPropertyMaskFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ public com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder() {
+ if (propertyMaskBuilder_ != null) {
+ return propertyMaskBuilder_.getMessageOrBuilder();
+ } else {
+ return propertyMask_ == null
+ ? com.google.datastore.v1.PropertyMask.getDefaultInstance()
+ : propertyMask_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>
+ getPropertyMaskFieldBuilder() {
+ if (propertyMaskBuilder_ == null) {
+ propertyMaskBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.PropertyMask,
+ com.google.datastore.v1.PropertyMask.Builder,
+ com.google.datastore.v1.PropertyMaskOrBuilder>(
+ getPropertyMask(), getParentForChildren(), isClean());
+ propertyMask_ = null;
+ }
+ return propertyMaskBuilder_;
+ }
+
private com.google.datastore.v1.ExplainOptions explainOptions_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.ExplainOptions,
@@ -2125,7 +2442,7 @@ public com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder() {
* @return Whether the explainOptions field is set.
*/
public boolean hasExplainOptions() {
- return ((bitField0_ & 0x00000040) != 0);
+ return ((bitField0_ & 0x00000080) != 0);
}
/**
*
@@ -2171,7 +2488,7 @@ public Builder setExplainOptions(com.google.datastore.v1.ExplainOptions value) {
} else {
explainOptionsBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -2194,7 +2511,7 @@ public Builder setExplainOptions(
} else {
explainOptionsBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -2212,7 +2529,7 @@ public Builder setExplainOptions(
*/
public Builder mergeExplainOptions(com.google.datastore.v1.ExplainOptions value) {
if (explainOptionsBuilder_ == null) {
- if (((bitField0_ & 0x00000040) != 0)
+ if (((bitField0_ & 0x00000080) != 0)
&& explainOptions_ != null
&& explainOptions_ != com.google.datastore.v1.ExplainOptions.getDefaultInstance()) {
getExplainOptionsBuilder().mergeFrom(value);
@@ -2223,7 +2540,7 @@ public Builder mergeExplainOptions(com.google.datastore.v1.ExplainOptions value)
explainOptionsBuilder_.mergeFrom(value);
}
if (explainOptions_ != null) {
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
}
return this;
@@ -2241,7 +2558,7 @@ public Builder mergeExplainOptions(com.google.datastore.v1.ExplainOptions value)
*
*/
public Builder clearExplainOptions() {
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00000080);
explainOptions_ = null;
if (explainOptionsBuilder_ != null) {
explainOptionsBuilder_.dispose();
@@ -2263,7 +2580,7 @@ public Builder clearExplainOptions() {
*
*/
public com.google.datastore.v1.ExplainOptions.Builder getExplainOptionsBuilder() {
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
return getExplainOptionsFieldBuilder().getBuilder();
}
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 9e7a6f0b9..55218e0e9 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,6 +229,53 @@ public interface RunQueryRequestOrBuilder
*/
com.google.datastore.v1.GqlQueryOrBuilder getGqlQueryOrBuilder();
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ *
+ * @return Whether the propertyMask field is set.
+ */
+ boolean hasPropertyMask();
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ *
+ * @return The propertyMask.
+ */
+ com.google.datastore.v1.PropertyMask getPropertyMask();
+ /**
+ *
+ *
+ *
+ * The properties to return.
+ * This field must not be set for a projection query.
+ *
+ * See
+ * [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ *
+ *
+ * .google.datastore.v1.PropertyMask property_mask = 10;
+ */
+ com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder();
+
/**
*
*
diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/aggregation_result.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/aggregation_result.proto
index 91c521716..262b61fa4 100644
--- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/aggregation_result.proto
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/aggregation_result.proto
@@ -1,4 +1,4 @@
-// Copyright 2023 Google LLC
+// 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.
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 1a3fbdd11..92b5038ea 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
@@ -1,4 +1,4 @@
-// Copyright 2023 Google LLC
+// 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.
@@ -173,6 +173,14 @@ message LookupRequest {
// Required. Keys of entities to look up.
repeated Key keys = 3 [(google.api.field_behavior) = REQUIRED];
+
+ // The properties to return. Defaults to returning all properties.
+ //
+ // If this field is set and an entity has a property not referenced in the
+ // mask, it will be absent from [LookupResponse.found.entity.properties][].
+ //
+ // The entity's key is always returned.
+ PropertyMask property_mask = 5;
}
// The response for [Datastore.Lookup][google.datastore.v1.Datastore.Lookup].
@@ -234,6 +242,13 @@ message RunQueryRequest {
GqlQuery gql_query = 7;
}
+ // The properties to return.
+ // This field must not be set for a projection query.
+ //
+ // See
+ // [LookupRequest.property_mask][google.datastore.v1.LookupRequest.property_mask].
+ PropertyMask property_mask = 10;
+
// 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];
@@ -526,6 +541,16 @@ message Mutation {
// mutation conflicts.
google.protobuf.Timestamp update_time = 11;
}
+
+ // The properties to write in this mutation.
+ // None of the properties in the mask may have a reserved name, except for
+ // `__key__`.
+ // This field is ignored for `delete`.
+ //
+ // If the entity already exists, only properties referenced in the mask are
+ // updated, others are left untouched.
+ // Properties referenced in the mask but not in the entity are deleted.
+ PropertyMask property_mask = 9;
}
// The result of applying a mutation.
@@ -555,6 +580,23 @@ message MutationResult {
bool conflict_detected = 5;
}
+// The set of arbitrarily nested property paths used to restrict an operation to
+// only a subset of properties in an entity.
+message PropertyMask {
+ // The paths to the properties covered by this mask.
+ //
+ // A path is a list of property names separated by dots (`.`), for example
+ // `foo.bar` means the property `bar` inside the entity property `foo` inside
+ // the entity associated with this path.
+ //
+ // If a property name contains a dot `.` or a backslash `\`, then that
+ // name must be escaped.
+ //
+ // A path must not be empty, and may not reference a value inside an
+ // [array value][google.datastore.v1.Value.array_value].
+ repeated string paths = 1;
+}
+
// The options shared by read requests.
message ReadOptions {
// The possible values for read consistencies.
diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/entity.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/entity.proto
index d80dd9093..ef4429343 100644
--- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/entity.proto
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/entity.proto
@@ -1,4 +1,4 @@
-// Copyright 2023 Google LLC
+// 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.
diff --git a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto
index d1f0f8d07..81386d47b 100644
--- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/query.proto
@@ -1,4 +1,4 @@
-// Copyright 2023 Google LLC
+// 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.
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
index 01c9fc254..f38681c66 100644
--- 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
@@ -1,4 +1,4 @@
-// Copyright 2023 Google LLC
+// 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.
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index d36722381..4b268da0e 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
com.google.cloud
google-cloud-datastore
- 2.19.1
+ 2.20.0
@@ -53,7 +53,7 @@
org.codehaus.mojo
build-helper-maven-plugin
- 3.5.0
+ 3.6.0
add-snippets-source
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index d1d30028d..00999bee3 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
libraries-bom
- 26.38.0
+ 26.39.0
pom
import
@@ -86,7 +86,7 @@
org.graalvm.buildtools
junit-platform-native
- 0.10.1
+ 0.10.2
test