TraceUtil instances are created by the {@link TraceUtil#getInstance()} method.
- */
-public class TraceUtil {
- private final Tracer tracer = Tracing.getTracer();
- private static final TraceUtil traceUtil = new TraceUtil();
- static final String SPAN_NAME_ALLOCATEIDS = "CloudDatastoreOperation.allocateIds";
- static final String SPAN_NAME_TRANSACTION = "CloudDatastoreOperation.readWriteTransaction";
- static final String SPAN_NAME_BEGINTRANSACTION = "CloudDatastoreOperation.beginTransaction";
- static final String SPAN_NAME_COMMIT = "CloudDatastoreOperation.commit";
- static final String SPAN_NAME_LOOKUP = "CloudDatastoreOperation.lookup";
- static final String SPAN_NAME_RESERVEIDS = "CloudDatastoreOperation.reserveIds";
- static final String SPAN_NAME_ROLLBACK = "CloudDatastoreOperation.rollback";
- static final String SPAN_NAME_RUNQUERY = "CloudDatastoreOperation.runQuery";
- static final String SPAN_NAME_RUN_AGGREGATION_QUERY =
- "CloudDatastoreOperation.runAggregationQuery";
- static final EndSpanOptions END_SPAN_OPTIONS =
- EndSpanOptions.builder().setSampleToLocalSpanStore(true).build();
-
- /**
- * Starts a new span.
- *
- * @param spanName The name of the returned Span.
- * @return The newly created {@link Span}.
- */
- protected Span startSpan(String spanName) {
- return tracer.spanBuilder(spanName).startSpan();
- }
-
- /**
- * Return the global {@link Tracer}.
- *
- * @return The global {@link Tracer}.
- */
- public Tracer getTracer() {
- return tracer;
- }
-
- /**
- * Return TraceUtil Object.
- *
- * @return An instance of {@link TraceUtil}
- */
- public static TraceUtil getInstance() {
- return traceUtil;
- }
-
- private TraceUtil() {}
-}
diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/TransactionImpl.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/TransactionImpl.java
index f08a908ec..e730db81f 100644
--- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/TransactionImpl.java
+++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/TransactionImpl.java
@@ -20,6 +20,7 @@
import com.google.api.core.BetaApi;
import com.google.cloud.datastore.models.ExplainOptions;
+import com.google.cloud.datastore.telemetry.TraceUtil;
import com.google.common.collect.ImmutableList;
import com.google.datastore.v1.ReadOptions;
import com.google.datastore.v1.TransactionOptions;
@@ -28,6 +29,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
+import javax.annotation.Nonnull;
final class TransactionImpl extends BaseDatastoreBatchWriter implements Transaction {
@@ -37,6 +39,8 @@ final class TransactionImpl extends BaseDatastoreBatchWriter implements Transact
private final ReadOptionProtoPreparer readOptionProtoPreparer;
+ @Nonnull private final TraceUtil traceUtil;
+
static class ResponseImpl implements Transaction.Response {
private final com.google.datastore.v1.CommitResponse response;
@@ -78,6 +82,7 @@ public List The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- * For example, to set the total timeout of getIndex to 30 seconds:
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getIndex:
*
* To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for exportEntities:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- * For example, to set the total timeout of getIndex to 30 seconds:
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getIndex:
*
* To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for exportEntities:
+ *
+ * Internal testing use only
*/
@InternalApi
public class RemoteDatastoreHelper {
-
private final DatastoreOptions options;
private final Datastore datastore;
private final String namespace;
@@ -76,31 +79,53 @@ public void deleteNamespace() {
/** Creates a {@code RemoteStorageHelper} object. */
public static RemoteDatastoreHelper create() {
- return create("", DatastoreOptions.getDefaultHttpTransportOptions());
+ return create(
+ "", DatastoreOptions.getDefaultHttpTransportOptions(), /*openTelemetrySdk=*/ null);
}
public static RemoteDatastoreHelper create(String databaseId) {
- return create(databaseId, DatastoreOptions.getDefaultHttpTransportOptions());
+ return create(
+ databaseId, DatastoreOptions.getDefaultHttpTransportOptions(), /*openTelemetrySdk=*/ null);
}
public static RemoteDatastoreHelper create(TransportOptions transportOptions) {
- return create("", transportOptions);
+ return create("", transportOptions, /*openTelemetrySdk=*/ null);
+ }
+
+ public static RemoteDatastoreHelper create(
+ String databaseId, @Nullable OpenTelemetrySdk openTelemetrySdk) {
+ return create(databaseId, DatastoreOptions.getDefaultHttpTransportOptions(), openTelemetrySdk);
}
- /** Creates a {@code RemoteStorageHelper} object. */
public static RemoteDatastoreHelper create(String databaseId, TransportOptions transportOptions) {
- DatastoreOptions.Builder builder =
+ return create(databaseId, transportOptions, /*openTelemetrySdk=*/ null);
+ }
+
+ /** Creates a {@code RemoteStorageHelper} object. */
+ public static RemoteDatastoreHelper create(
+ String databaseId,
+ TransportOptions transportOptions,
+ @Nullable OpenTelemetrySdk openTelemetrySdk) {
+ DatastoreOptions.Builder datastoreOptionBuilder =
DatastoreOptions.newBuilder()
.setDatabaseId(databaseId)
.setNamespace(UUID.randomUUID().toString())
.setRetrySettings(retrySettings());
if (transportOptions instanceof GrpcTransportOptions) {
- builder = builder.setTransportOptions((GrpcTransportOptions) transportOptions);
+ datastoreOptionBuilder =
+ datastoreOptionBuilder.setTransportOptions((GrpcTransportOptions) transportOptions);
} else {
- builder = builder.setTransportOptions(transportOptions);
+ datastoreOptionBuilder = datastoreOptionBuilder.setTransportOptions(transportOptions);
+ }
+
+ if (openTelemetrySdk != null) {
+ datastoreOptionBuilder.setOpenTelemetryOptions(
+ DatastoreOpenTelemetryOptions.newBuilder()
+ .setOpenTelemetry(openTelemetrySdk)
+ .setTracingEnabled(true)
+ .build());
}
- DatastoreOptions datastoreOption = builder.build();
- return new RemoteDatastoreHelper(datastoreOption);
+ return new RemoteDatastoreHelper(datastoreOptionBuilder.build());
}
private static RetrySettings retrySettings() {
diff --git a/grpc-google-cloud-datastore-admin-v1/pom.xml b/grpc-google-cloud-datastore-admin-v1/pom.xml
index 48292987d..495344ad1 100644
--- a/grpc-google-cloud-datastore-admin-v1/pom.xml
+++ b/grpc-google-cloud-datastore-admin-v1/pom.xml
@@ -4,13 +4,13 @@
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -82,10 +84,47 @@
* .getIndexSettings()
* .getRetrySettings()
* .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
* DatastoreAdminSettings datastoreAdminSettings = datastoreAdminSettingsBuilder.build();
* }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DatastoreAdminSettings.Builder datastoreAdminSettingsBuilder =
+ * DatastoreAdminSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelay(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * datastoreAdminSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
*/
@Generated("by gapic-generator-java")
public class DatastoreAdminSettings extends ClientSettings{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -102,10 +105,47 @@
* .getIndexSettings()
* .getRetrySettings()
* .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
* DatastoreAdminStubSettings datastoreAdminSettings = datastoreAdminSettingsBuilder.build();
* }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DatastoreAdminStubSettings.Builder datastoreAdminSettingsBuilder =
+ * DatastoreAdminStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelay(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * datastoreAdminSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
*/
@Generated("by gapic-generator-java")
public class DatastoreAdminStubSettings extends StubSettings> callStackList)
+ throws InterruptedException {
+ // Large enough count to accommodate eventually consistent Cloud Trace backend
+ int numRetries = GET_TRACE_RETRY_COUNT;
+ // Account for rootSpanName
+ numExpectedSpans++;
+
+ // Fetch traces
+ do {
+ try {
+ retrievedTrace = traceClient_v1.getTrace(projectId, traceId);
+ assertEquals(traceId, retrievedTrace.getTraceId());
+
+ logger.info(
+ "expectedSpanCount="
+ + numExpectedSpans
+ + ", retrievedSpanCount="
+ + retrievedTrace.getSpansCount());
+ } catch (NotFoundException notFound) {
+ logger.info("Trace not found, retrying in " + GET_TRACE_RETRY_BACKOFF_MILLIS + " ms");
+ } catch (IndexOutOfBoundsException outOfBoundsException) {
+ logger.info("Call stack not found in trace. Retrying.");
+ }
+ if (retrievedTrace == null || numExpectedSpans != retrievedTrace.getSpansCount()) {
+ Thread.sleep(GET_TRACE_RETRY_BACKOFF_MILLIS);
+ }
+ } while (numRetries-- > 0
+ && (retrievedTrace == null || numExpectedSpans != retrievedTrace.getSpansCount()));
+
+ if (retrievedTrace == null || numExpectedSpans != retrievedTrace.getSpansCount()) {
+ throw new RuntimeException(
+ "Expected number of spans: "
+ + numExpectedSpans
+ + ", Actual number of spans: "
+ + (retrievedTrace != null
+ ? retrievedTrace.getSpansList().toString()
+ : "Trace NOT_FOUND"));
+ }
+
+ TraceContainer traceContainer = new TraceContainer(rootSpanName, retrievedTrace);
+
+ for (List
+ * The possible ways to resolve a conflict detected in a mutation.
+ *
+ *
+ * Protobuf enum {@code google.datastore.v1.Mutation.ConflictResolutionStrategy}
+ */
+ public enum ConflictResolutionStrategy implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified. Defaults to `SERVER_VALUE`.
+ *
+ *
+ * STRATEGY_UNSPECIFIED = 0;
+ */
+ STRATEGY_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * The server entity is kept.
+ *
+ *
+ * SERVER_VALUE = 1;
+ */
+ SERVER_VALUE(1),
+ /**
+ *
+ *
+ *
+ * The whole commit request fails.
+ *
+ *
+ * FAIL = 3;
+ */
+ FAIL(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified. Defaults to `SERVER_VALUE`.
+ *
+ *
+ * STRATEGY_UNSPECIFIED = 0;
+ */
+ public static final int STRATEGY_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * The server entity is kept.
+ *
+ *
+ * SERVER_VALUE = 1;
+ */
+ public static final int SERVER_VALUE_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * The whole commit request fails.
+ *
+ *
+ * FAIL = 3;
+ */
+ public static final int FAIL_VALUE = 3;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static ConflictResolutionStrategy valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static ConflictResolutionStrategy forNumber(int value) {
+ switch (value) {
+ case 0:
+ return STRATEGY_UNSPECIFIED;
+ case 1:
+ return SERVER_VALUE;
+ case 3:
+ return FAIL;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @return The enum numeric value on the wire for conflictResolutionStrategy.
+ */
+ @java.lang.Override
+ public int getConflictResolutionStrategyValue() {
+ return conflictResolutionStrategy_;
+ }
+ /**
+ *
+ *
+ *
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @return The conflictResolutionStrategy.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Mutation.ConflictResolutionStrategy
+ getConflictResolutionStrategy() {
+ com.google.datastore.v1.Mutation.ConflictResolutionStrategy result =
+ com.google.datastore.v1.Mutation.ConflictResolutionStrategy.forNumber(
+ conflictResolutionStrategy_);
+ return result == null
+ ? com.google.datastore.v1.Mutation.ConflictResolutionStrategy.UNRECOGNIZED
+ : result;
+ }
+
public static final int PROPERTY_MASK_FIELD_NUMBER = 9;
private com.google.datastore.v1.PropertyMask propertyMask_;
/**
@@ -548,6 +758,108 @@ public com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder()
: propertyMask_;
}
+ public static final int PROPERTY_TRANSFORMS_FIELD_NUMBER = 12;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public java.util.List
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.datastore.v1.PropertyTransformOrBuilder>
+ getPropertyTransformsOrBuilderList() {
+ return propertyTransforms_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public int getPropertyTransformsCount() {
+ return propertyTransforms_.size();
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyTransform getPropertyTransforms(int index) {
+ return propertyTransforms_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyTransformOrBuilder getPropertyTransformsOrBuilder(
+ int index) {
+ return propertyTransforms_.get(index);
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -580,9 +892,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(9, getPropertyMask());
}
+ if (conflictResolutionStrategy_
+ != com.google.datastore.v1.Mutation.ConflictResolutionStrategy.STRATEGY_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(10, conflictResolutionStrategy_);
+ }
if (conflictDetectionStrategyCase_ == 11) {
output.writeMessage(11, (com.google.protobuf.Timestamp) conflictDetectionStrategy_);
}
+ for (int i = 0; i < propertyTransforms_.size(); i++) {
+ output.writeMessage(12, propertyTransforms_.get(i));
+ }
getUnknownFields().writeTo(output);
}
@@ -620,11 +940,21 @@ public int getSerializedSize() {
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getPropertyMask());
}
+ if (conflictResolutionStrategy_
+ != com.google.datastore.v1.Mutation.ConflictResolutionStrategy.STRATEGY_UNSPECIFIED
+ .getNumber()) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(10, conflictResolutionStrategy_);
+ }
if (conflictDetectionStrategyCase_ == 11) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
11, (com.google.protobuf.Timestamp) conflictDetectionStrategy_);
}
+ for (int i = 0; i < propertyTransforms_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(12, propertyTransforms_.get(i));
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -640,10 +970,12 @@ public boolean equals(final java.lang.Object obj) {
}
com.google.datastore.v1.Mutation other = (com.google.datastore.v1.Mutation) obj;
+ if (conflictResolutionStrategy_ != other.conflictResolutionStrategy_) return false;
if (hasPropertyMask() != other.hasPropertyMask()) return false;
if (hasPropertyMask()) {
if (!getPropertyMask().equals(other.getPropertyMask())) return false;
}
+ if (!getPropertyTransformsList().equals(other.getPropertyTransformsList())) return false;
if (!getOperationCase().equals(other.getOperationCase())) return false;
switch (operationCase_) {
case 4:
@@ -684,10 +1016,16 @@ public int hashCode() {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + CONFLICT_RESOLUTION_STRATEGY_FIELD_NUMBER;
+ hash = (53 * hash) + conflictResolutionStrategy_;
if (hasPropertyMask()) {
hash = (37 * hash) + PROPERTY_MASK_FIELD_NUMBER;
hash = (53 * hash) + getPropertyMask().hashCode();
}
+ if (getPropertyTransformsCount() > 0) {
+ hash = (37 * hash) + PROPERTY_TRANSFORMS_FIELD_NUMBER;
+ hash = (53 * hash) + getPropertyTransformsList().hashCode();
+ }
switch (operationCase_) {
case 4:
hash = (37 * hash) + INSERT_FIELD_NUMBER;
@@ -860,6 +1198,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getPropertyMaskFieldBuilder();
+ getPropertyTransformsFieldBuilder();
}
}
@@ -882,11 +1221,19 @@ public Builder clear() {
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.clear();
}
+ conflictResolutionStrategy_ = 0;
propertyMask_ = null;
if (propertyMaskBuilder_ != null) {
propertyMaskBuilder_.dispose();
propertyMaskBuilder_ = null;
}
+ if (propertyTransformsBuilder_ == null) {
+ propertyTransforms_ = java.util.Collections.emptyList();
+ } else {
+ propertyTransforms_ = null;
+ propertyTransformsBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000100);
operationCase_ = 0;
operation_ = null;
conflictDetectionStrategyCase_ = 0;
@@ -917,6 +1264,7 @@ public com.google.datastore.v1.Mutation build() {
@java.lang.Override
public com.google.datastore.v1.Mutation buildPartial() {
com.google.datastore.v1.Mutation result = new com.google.datastore.v1.Mutation(this);
+ buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
@@ -925,10 +1273,25 @@ public com.google.datastore.v1.Mutation buildPartial() {
return result;
}
+ private void buildPartialRepeatedFields(com.google.datastore.v1.Mutation result) {
+ if (propertyTransformsBuilder_ == null) {
+ if (((bitField0_ & 0x00000100) != 0)) {
+ propertyTransforms_ = java.util.Collections.unmodifiableList(propertyTransforms_);
+ bitField0_ = (bitField0_ & ~0x00000100);
+ }
+ result.propertyTransforms_ = propertyTransforms_;
+ } else {
+ result.propertyTransforms_ = propertyTransformsBuilder_.build();
+ }
+ }
+
private void buildPartial0(com.google.datastore.v1.Mutation result) {
int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.conflictResolutionStrategy_ = conflictResolutionStrategy_;
+ }
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000080) != 0)) {
result.propertyMask_ =
propertyMaskBuilder_ == null ? propertyMask_ : propertyMaskBuilder_.build();
to_bitField0_ |= 0x00000001;
@@ -1003,9 +1366,39 @@ 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.conflictResolutionStrategy_ != 0) {
+ setConflictResolutionStrategyValue(other.getConflictResolutionStrategyValue());
+ }
if (other.hasPropertyMask()) {
mergePropertyMask(other.getPropertyMask());
}
+ if (propertyTransformsBuilder_ == null) {
+ if (!other.propertyTransforms_.isEmpty()) {
+ if (propertyTransforms_.isEmpty()) {
+ propertyTransforms_ = other.propertyTransforms_;
+ bitField0_ = (bitField0_ & ~0x00000100);
+ } else {
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.addAll(other.propertyTransforms_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.propertyTransforms_.isEmpty()) {
+ if (propertyTransformsBuilder_.isEmpty()) {
+ propertyTransformsBuilder_.dispose();
+ propertyTransformsBuilder_ = null;
+ propertyTransforms_ = other.propertyTransforms_;
+ bitField0_ = (bitField0_ & ~0x00000100);
+ propertyTransformsBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+ ? getPropertyTransformsFieldBuilder()
+ : null;
+ } else {
+ propertyTransformsBuilder_.addAllMessages(other.propertyTransforms_);
+ }
+ }
+ }
switch (other.getOperationCase()) {
case INSERT:
{
@@ -1107,15 +1500,34 @@ public Builder mergeFrom(
case 74:
{
input.readMessage(getPropertyMaskFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
break;
} // case 74
+ case 80:
+ {
+ conflictResolutionStrategy_ = input.readEnum();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 80
case 90:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
conflictDetectionStrategyCase_ = 11;
break;
} // case 90
+ case 98:
+ {
+ com.google.datastore.v1.PropertyTransform m =
+ input.readMessage(
+ com.google.datastore.v1.PropertyTransform.parser(), extensionRegistry);
+ if (propertyTransformsBuilder_ == null) {
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.add(m);
+ } else {
+ propertyTransformsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 98
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -2322,6 +2734,121 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
return updateTimeBuilder_;
}
+ private int conflictResolutionStrategy_ = 0;
+ /**
+ *
+ *
+ *
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @return The enum numeric value on the wire for conflictResolutionStrategy.
+ */
+ @java.lang.Override
+ public int getConflictResolutionStrategyValue() {
+ return conflictResolutionStrategy_;
+ }
+ /**
+ *
+ *
+ *
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @param value The enum numeric value on the wire for conflictResolutionStrategy to set.
+ * @return This builder for chaining.
+ */
+ public Builder setConflictResolutionStrategyValue(int value) {
+ conflictResolutionStrategy_ = value;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @return The conflictResolutionStrategy.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Mutation.ConflictResolutionStrategy
+ getConflictResolutionStrategy() {
+ com.google.datastore.v1.Mutation.ConflictResolutionStrategy result =
+ com.google.datastore.v1.Mutation.ConflictResolutionStrategy.forNumber(
+ conflictResolutionStrategy_);
+ return result == null
+ ? com.google.datastore.v1.Mutation.ConflictResolutionStrategy.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ *
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @param value The conflictResolutionStrategy to set.
+ * @return This builder for chaining.
+ */
+ public Builder setConflictResolutionStrategy(
+ com.google.datastore.v1.Mutation.ConflictResolutionStrategy value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000040;
+ conflictResolutionStrategy_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearConflictResolutionStrategy() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ conflictResolutionStrategy_ = 0;
+ onChanged();
+ return this;
+ }
+
private com.google.datastore.v1.PropertyMask propertyMask_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.PropertyMask,
@@ -2347,7 +2874,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
* @return Whether the propertyMask field is set.
*/
public boolean hasPropertyMask() {
- return ((bitField0_ & 0x00000040) != 0);
+ return ((bitField0_ & 0x00000080) != 0);
}
/**
*
@@ -2401,7 +2928,7 @@ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask value) {
} else {
propertyMaskBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -2427,7 +2954,7 @@ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask.Builder buil
} else {
propertyMaskBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -2449,7 +2976,7 @@ public Builder setPropertyMask(com.google.datastore.v1.PropertyMask.Builder buil
*/
public Builder mergePropertyMask(com.google.datastore.v1.PropertyMask value) {
if (propertyMaskBuilder_ == null) {
- if (((bitField0_ & 0x00000040) != 0)
+ if (((bitField0_ & 0x00000080) != 0)
&& propertyMask_ != null
&& propertyMask_ != com.google.datastore.v1.PropertyMask.getDefaultInstance()) {
getPropertyMaskBuilder().mergeFrom(value);
@@ -2460,7 +2987,7 @@ public Builder mergePropertyMask(com.google.datastore.v1.PropertyMask value) {
propertyMaskBuilder_.mergeFrom(value);
}
if (propertyMask_ != null) {
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
}
return this;
@@ -2482,7 +3009,7 @@ public Builder mergePropertyMask(com.google.datastore.v1.PropertyMask value) {
* .google.datastore.v1.PropertyMask property_mask = 9;
*/
public Builder clearPropertyMask() {
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00000080);
propertyMask_ = null;
if (propertyMaskBuilder_ != null) {
propertyMaskBuilder_.dispose();
@@ -2508,7 +3035,7 @@ public Builder clearPropertyMask() {
* .google.datastore.v1.PropertyMask property_mask = 9;
*/
public com.google.datastore.v1.PropertyMask.Builder getPropertyMaskBuilder() {
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
return getPropertyMaskFieldBuilder().getBuilder();
}
@@ -2570,6 +3097,473 @@ public com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder()
return propertyMaskBuilder_;
}
+ private java.util.List
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public java.util.List
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public int getPropertyTransformsCount() {
+ if (propertyTransformsBuilder_ == null) {
+ return propertyTransforms_.size();
+ } else {
+ return propertyTransformsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.PropertyTransform getPropertyTransforms(int index) {
+ if (propertyTransformsBuilder_ == null) {
+ return propertyTransforms_.get(index);
+ } else {
+ return propertyTransformsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setPropertyTransforms(
+ int index, com.google.datastore.v1.PropertyTransform value) {
+ if (propertyTransformsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.set(index, value);
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setPropertyTransforms(
+ int index, com.google.datastore.v1.PropertyTransform.Builder builderForValue) {
+ if (propertyTransformsBuilder_ == null) {
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addPropertyTransforms(com.google.datastore.v1.PropertyTransform value) {
+ if (propertyTransformsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.add(value);
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addPropertyTransforms(
+ int index, com.google.datastore.v1.PropertyTransform value) {
+ if (propertyTransformsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.add(index, value);
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addPropertyTransforms(
+ com.google.datastore.v1.PropertyTransform.Builder builderForValue) {
+ if (propertyTransformsBuilder_ == null) {
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.add(builderForValue.build());
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addPropertyTransforms(
+ int index, com.google.datastore.v1.PropertyTransform.Builder builderForValue) {
+ if (propertyTransformsBuilder_ == null) {
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addAllPropertyTransforms(
+ java.lang.Iterable extends com.google.datastore.v1.PropertyTransform> values) {
+ if (propertyTransformsBuilder_ == null) {
+ ensurePropertyTransformsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, propertyTransforms_);
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearPropertyTransforms() {
+ if (propertyTransformsBuilder_ == null) {
+ propertyTransforms_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000100);
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder removePropertyTransforms(int index) {
+ if (propertyTransformsBuilder_ == null) {
+ ensurePropertyTransformsIsMutable();
+ propertyTransforms_.remove(index);
+ onChanged();
+ } else {
+ propertyTransformsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.PropertyTransform.Builder getPropertyTransformsBuilder(
+ int index) {
+ return getPropertyTransformsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.PropertyTransformOrBuilder getPropertyTransformsOrBuilder(
+ int index) {
+ if (propertyTransformsBuilder_ == null) {
+ return propertyTransforms_.get(index);
+ } else {
+ return propertyTransformsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public java.util.List extends com.google.datastore.v1.PropertyTransformOrBuilder>
+ getPropertyTransformsOrBuilderList() {
+ if (propertyTransformsBuilder_ != null) {
+ return propertyTransformsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(propertyTransforms_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.PropertyTransform.Builder addPropertyTransformsBuilder() {
+ return getPropertyTransformsFieldBuilder()
+ .addBuilder(com.google.datastore.v1.PropertyTransform.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.datastore.v1.PropertyTransform.Builder addPropertyTransformsBuilder(
+ int index) {
+ return getPropertyTransformsFieldBuilder()
+ .addBuilder(index, com.google.datastore.v1.PropertyTransform.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public java.util.List
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @return The enum numeric value on the wire for conflictResolutionStrategy.
+ */
+ int getConflictResolutionStrategyValue();
+ /**
+ *
+ *
+ *
+ * The strategy to use when a conflict is detected. Defaults to
+ * `SERVER_VALUE`.
+ * If this is set, then `conflict_detection_strategy` must also be set.
+ *
+ *
+ *
+ * .google.datastore.v1.Mutation.ConflictResolutionStrategy conflict_resolution_strategy = 10;
+ *
+ *
+ * @return The conflictResolutionStrategy.
+ */
+ com.google.datastore.v1.Mutation.ConflictResolutionStrategy getConflictResolutionStrategy();
+
/**
*
*
@@ -302,6 +335,88 @@ public interface MutationOrBuilder
*/
com.google.datastore.v1.PropertyMaskOrBuilder getPropertyMaskOrBuilder();
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ java.util.List
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.datastore.v1.PropertyTransform getPropertyTransforms(int index);
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ int getPropertyTransformsCount();
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ java.util.List extends com.google.datastore.v1.PropertyTransformOrBuilder>
+ getPropertyTransformsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * Optional. The transforms to perform on the entity.
+ *
+ * This field can be set only when the operation is `insert`, `update`,
+ * or `upsert`. If present, the transforms are be applied to the entity
+ * regardless of the property mask, in order, after the operation.
+ *
+ *
+ *
+ * repeated .google.datastore.v1.PropertyTransform property_transforms = 12 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.datastore.v1.PropertyTransformOrBuilder getPropertyTransformsOrBuilder(int index);
+
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/MutationResult.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResult.java
index 2e7abf0bd..aa05f03da 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResult.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/MutationResult.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/datastore.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
@@ -38,7 +38,9 @@ private MutationResult(com.google.protobuf.GeneratedMessageV3.Builder> builder
super(builder);
}
- private MutationResult() {}
+ private MutationResult() {
+ transformResults_ = java.util.Collections.emptyList();
+ }
@java.lang.Override
@SuppressWarnings({"unused"})
@@ -253,6 +255,87 @@ public boolean getConflictDetected() {
return conflictDetected_;
}
+ public static final int TRANSFORM_RESULTS_FIELD_NUMBER = 8;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ @java.lang.Override
+ public java.util.List
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.datastore.v1.ValueOrBuilder>
+ getTransformResultsOrBuilderList() {
+ return transformResults_;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ @java.lang.Override
+ public int getTransformResultsCount() {
+ return transformResults_.size();
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Value getTransformResults(int index) {
+ return transformResults_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ValueOrBuilder getTransformResultsOrBuilder(int index) {
+ return transformResults_.get(index);
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -282,6 +365,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getCreateTime());
}
+ for (int i = 0; i < transformResults_.size(); i++) {
+ output.writeMessage(8, transformResults_.get(i));
+ }
getUnknownFields().writeTo(output);
}
@@ -306,6 +392,9 @@ public int getSerializedSize() {
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime());
}
+ for (int i = 0; i < transformResults_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, transformResults_.get(i));
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -335,6 +424,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getUpdateTime().equals(other.getUpdateTime())) return false;
}
if (getConflictDetected() != other.getConflictDetected()) return false;
+ if (!getTransformResultsList().equals(other.getTransformResultsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -362,6 +452,10 @@ public int hashCode() {
}
hash = (37 * hash) + CONFLICT_DETECTED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getConflictDetected());
+ if (getTransformResultsCount() > 0) {
+ hash = (37 * hash) + TRANSFORM_RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getTransformResultsList().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -505,6 +599,7 @@ private void maybeForceBuilderInitialization() {
getKeyFieldBuilder();
getCreateTimeFieldBuilder();
getUpdateTimeFieldBuilder();
+ getTransformResultsFieldBuilder();
}
}
@@ -529,6 +624,13 @@ public Builder clear() {
updateTimeBuilder_ = null;
}
conflictDetected_ = false;
+ if (transformResultsBuilder_ == null) {
+ transformResults_ = java.util.Collections.emptyList();
+ } else {
+ transformResults_ = null;
+ transformResultsBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@@ -556,6 +658,7 @@ public com.google.datastore.v1.MutationResult build() {
public com.google.datastore.v1.MutationResult buildPartial() {
com.google.datastore.v1.MutationResult result =
new com.google.datastore.v1.MutationResult(this);
+ buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
@@ -563,6 +666,18 @@ public com.google.datastore.v1.MutationResult buildPartial() {
return result;
}
+ private void buildPartialRepeatedFields(com.google.datastore.v1.MutationResult result) {
+ if (transformResultsBuilder_ == null) {
+ if (((bitField0_ & 0x00000020) != 0)) {
+ transformResults_ = java.util.Collections.unmodifiableList(transformResults_);
+ bitField0_ = (bitField0_ & ~0x00000020);
+ }
+ result.transformResults_ = transformResults_;
+ } else {
+ result.transformResults_ = transformResultsBuilder_.build();
+ }
+ }
+
private void buildPartial0(com.google.datastore.v1.MutationResult result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
@@ -647,6 +762,33 @@ public Builder mergeFrom(com.google.datastore.v1.MutationResult other) {
if (other.getConflictDetected() != false) {
setConflictDetected(other.getConflictDetected());
}
+ if (transformResultsBuilder_ == null) {
+ if (!other.transformResults_.isEmpty()) {
+ if (transformResults_.isEmpty()) {
+ transformResults_ = other.transformResults_;
+ bitField0_ = (bitField0_ & ~0x00000020);
+ } else {
+ ensureTransformResultsIsMutable();
+ transformResults_.addAll(other.transformResults_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.transformResults_.isEmpty()) {
+ if (transformResultsBuilder_.isEmpty()) {
+ transformResultsBuilder_.dispose();
+ transformResultsBuilder_ = null;
+ transformResults_ = other.transformResults_;
+ bitField0_ = (bitField0_ & ~0x00000020);
+ transformResultsBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+ ? getTransformResultsFieldBuilder()
+ : null;
+ } else {
+ transformResultsBuilder_.addAllMessages(other.transformResults_);
+ }
+ }
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -703,6 +845,18 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 58
+ case 66:
+ {
+ com.google.datastore.v1.Value m =
+ input.readMessage(com.google.datastore.v1.Value.parser(), extensionRegistry);
+ if (transformResultsBuilder_ == null) {
+ ensureTransformResultsIsMutable();
+ transformResults_.add(m);
+ } else {
+ transformResultsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 66
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1429,6 +1583,394 @@ public Builder clearConflictDetected() {
return this;
}
+ private java.util.List
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public java.util.List
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public int getTransformResultsCount() {
+ if (transformResultsBuilder_ == null) {
+ return transformResults_.size();
+ } else {
+ return transformResultsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public com.google.datastore.v1.Value getTransformResults(int index) {
+ if (transformResultsBuilder_ == null) {
+ return transformResults_.get(index);
+ } else {
+ return transformResultsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder setTransformResults(int index, com.google.datastore.v1.Value value) {
+ if (transformResultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTransformResultsIsMutable();
+ transformResults_.set(index, value);
+ onChanged();
+ } else {
+ transformResultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder setTransformResults(
+ int index, com.google.datastore.v1.Value.Builder builderForValue) {
+ if (transformResultsBuilder_ == null) {
+ ensureTransformResultsIsMutable();
+ transformResults_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ transformResultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder addTransformResults(com.google.datastore.v1.Value value) {
+ if (transformResultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTransformResultsIsMutable();
+ transformResults_.add(value);
+ onChanged();
+ } else {
+ transformResultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder addTransformResults(int index, com.google.datastore.v1.Value value) {
+ if (transformResultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTransformResultsIsMutable();
+ transformResults_.add(index, value);
+ onChanged();
+ } else {
+ transformResultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder addTransformResults(com.google.datastore.v1.Value.Builder builderForValue) {
+ if (transformResultsBuilder_ == null) {
+ ensureTransformResultsIsMutable();
+ transformResults_.add(builderForValue.build());
+ onChanged();
+ } else {
+ transformResultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder addTransformResults(
+ int index, com.google.datastore.v1.Value.Builder builderForValue) {
+ if (transformResultsBuilder_ == null) {
+ ensureTransformResultsIsMutable();
+ transformResults_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ transformResultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder addAllTransformResults(
+ java.lang.Iterable extends com.google.datastore.v1.Value> values) {
+ if (transformResultsBuilder_ == null) {
+ ensureTransformResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transformResults_);
+ onChanged();
+ } else {
+ transformResultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder clearTransformResults() {
+ if (transformResultsBuilder_ == null) {
+ transformResults_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000020);
+ onChanged();
+ } else {
+ transformResultsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public Builder removeTransformResults(int index) {
+ if (transformResultsBuilder_ == null) {
+ ensureTransformResultsIsMutable();
+ transformResults_.remove(index);
+ onChanged();
+ } else {
+ transformResultsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public com.google.datastore.v1.Value.Builder getTransformResultsBuilder(int index) {
+ return getTransformResultsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public com.google.datastore.v1.ValueOrBuilder getTransformResultsOrBuilder(int index) {
+ if (transformResultsBuilder_ == null) {
+ return transformResults_.get(index);
+ } else {
+ return transformResultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public java.util.List extends com.google.datastore.v1.ValueOrBuilder>
+ getTransformResultsOrBuilderList() {
+ if (transformResultsBuilder_ != null) {
+ return transformResultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(transformResults_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public com.google.datastore.v1.Value.Builder addTransformResultsBuilder() {
+ return getTransformResultsFieldBuilder()
+ .addBuilder(com.google.datastore.v1.Value.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public com.google.datastore.v1.Value.Builder addTransformResultsBuilder(int index) {
+ return getTransformResultsFieldBuilder()
+ .addBuilder(index, com.google.datastore.v1.Value.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ public java.util.List
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ java.util.List
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ com.google.datastore.v1.Value getTransformResults(int index);
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ int getTransformResultsCount();
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ java.util.List extends com.google.datastore.v1.ValueOrBuilder>
+ getTransformResultsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * The results of applying each
+ * [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ * order of the request.
+ *
+ *
+ * repeated .google.datastore.v1.Value transform_results = 8;
+ */
+ com.google.datastore.v1.ValueOrBuilder getTransformResultsOrBuilder(int index);
}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PartitionId.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PartitionId.java
index 9116410f5..09ea652c9 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PartitionId.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PartitionId.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/entity.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PartitionIdOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PartitionIdOrBuilder.java
index d9dc8c271..7c418fe37 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PartitionIdOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PartitionIdOrBuilder.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/entity.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public interface PartitionIdOrBuilder
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
index b68c700c3..365b11d31 100644
--- 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
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query_profile.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PlanSummaryOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PlanSummaryOrBuilder.java
index 634faded7..8088a8c24 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PlanSummaryOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PlanSummaryOrBuilder.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query_profile.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public interface PlanSummaryOrBuilder
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Projection.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Projection.java
index 412dc13dd..cfd0dc705 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Projection.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Projection.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ProjectionOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ProjectionOrBuilder.java
index c1a094d81..71920236c 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ProjectionOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/ProjectionOrBuilder.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public interface ProjectionOrBuilder
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyFilter.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyFilter.java
index 3eb9c2c1d..814bfe7fa 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyFilter.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyFilter.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyFilterOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyFilterOrBuilder.java
index c7c9d0577..fd74ed8e9 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyFilterOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyFilterOrBuilder.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public interface PropertyFilterOrBuilder
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
index 2d9c2caf6..432846ebc 100644
--- 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
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/datastore.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
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
index 8711d5d8a..e36a55be5 100644
--- 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
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/datastore.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public interface PropertyMaskOrBuilder
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyOrder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyOrder.java
index b42405c97..c12f8741b 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyOrder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyOrder.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyOrderOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyOrderOrBuilder.java
index 3522ab951..4e4e8b986 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyOrderOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyOrderOrBuilder.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public interface PropertyOrderOrBuilder
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyReference.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyReference.java
index a7a4c304e..d1ce5477e 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyReference.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyReference.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyReferenceOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyReferenceOrBuilder.java
index 7761b1421..0d80ea0ea 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyReferenceOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyReferenceOrBuilder.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public interface PropertyReferenceOrBuilder
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyTransform.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyTransform.java
new file mode 100644
index 000000000..520ccb0f2
--- /dev/null
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/PropertyTransform.java
@@ -0,0 +1,3197 @@
+/*
+ * 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.5
+package com.google.datastore.v1;
+
+/**
+ *
+ *
+ *
+ * A transformation of an entity property.
+ *
+ *
+ * Protobuf type {@code google.datastore.v1.PropertyTransform}
+ */
+public final class PropertyTransform extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.datastore.v1.PropertyTransform)
+ PropertyTransformOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use PropertyTransform.newBuilder() to construct.
+ private PropertyTransform(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private PropertyTransform() {
+ property_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new PropertyTransform();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.datastore.v1.DatastoreProto
+ .internal_static_google_datastore_v1_PropertyTransform_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.datastore.v1.DatastoreProto
+ .internal_static_google_datastore_v1_PropertyTransform_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.datastore.v1.PropertyTransform.class,
+ com.google.datastore.v1.PropertyTransform.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * A value that is calculated by the server.
+ *
+ *
+ * Protobuf enum {@code google.datastore.v1.PropertyTransform.ServerValue}
+ */
+ public enum ServerValue implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified. This value must not be used.
+ *
+ *
+ * SERVER_VALUE_UNSPECIFIED = 0;
+ */
+ SERVER_VALUE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * The time at which the server processed the request, with millisecond
+ * precision. If used on multiple properties (same or different entities)
+ * in a transaction, all the properties will get the same server timestamp.
+ *
+ *
+ * REQUEST_TIME = 1;
+ */
+ REQUEST_TIME(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified. This value must not be used.
+ *
+ *
+ * SERVER_VALUE_UNSPECIFIED = 0;
+ */
+ public static final int SERVER_VALUE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * The time at which the server processed the request, with millisecond
+ * precision. If used on multiple properties (same or different entities)
+ * in a transaction, all the properties will get the same server timestamp.
+ *
+ *
+ * REQUEST_TIME = 1;
+ */
+ public static final int REQUEST_TIME_VALUE = 1;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static ServerValue valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static ServerValue forNumber(int value) {
+ switch (value) {
+ case 0:
+ return SERVER_VALUE_UNSPECIFIED;
+ case 1:
+ return REQUEST_TIME;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The property.
+ */
+ @java.lang.Override
+ public java.lang.String getProperty() {
+ java.lang.Object ref = property_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ property_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for property.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPropertyBytes() {
+ java.lang.Object ref = property_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ property_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SET_TO_SERVER_VALUE_FIELD_NUMBER = 2;
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return Whether the setToServerValue field is set.
+ */
+ public boolean hasSetToServerValue() {
+ return transformTypeCase_ == 2;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return The enum numeric value on the wire for setToServerValue.
+ */
+ public int getSetToServerValueValue() {
+ if (transformTypeCase_ == 2) {
+ return (java.lang.Integer) transformType_;
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return The setToServerValue.
+ */
+ public com.google.datastore.v1.PropertyTransform.ServerValue getSetToServerValue() {
+ if (transformTypeCase_ == 2) {
+ com.google.datastore.v1.PropertyTransform.ServerValue result =
+ com.google.datastore.v1.PropertyTransform.ServerValue.forNumber(
+ (java.lang.Integer) transformType_);
+ return result == null
+ ? com.google.datastore.v1.PropertyTransform.ServerValue.UNRECOGNIZED
+ : result;
+ }
+ return com.google.datastore.v1.PropertyTransform.ServerValue.SERVER_VALUE_UNSPECIFIED;
+ }
+
+ public static final int INCREMENT_FIELD_NUMBER = 3;
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ *
+ * @return Whether the increment field is set.
+ */
+ @java.lang.Override
+ public boolean hasIncrement() {
+ return transformTypeCase_ == 3;
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ *
+ * @return The increment.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Value getIncrement() {
+ if (transformTypeCase_ == 3) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ValueOrBuilder getIncrementOrBuilder() {
+ if (transformTypeCase_ == 3) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+
+ public static final int MAXIMUM_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ *
+ * @return Whether the maximum field is set.
+ */
+ @java.lang.Override
+ public boolean hasMaximum() {
+ return transformTypeCase_ == 4;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ *
+ * @return The maximum.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Value getMaximum() {
+ if (transformTypeCase_ == 4) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ValueOrBuilder getMaximumOrBuilder() {
+ if (transformTypeCase_ == 4) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+
+ public static final int MINIMUM_FIELD_NUMBER = 5;
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ *
+ * @return Whether the minimum field is set.
+ */
+ @java.lang.Override
+ public boolean hasMinimum() {
+ return transformTypeCase_ == 5;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ *
+ * @return The minimum.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Value getMinimum() {
+ if (transformTypeCase_ == 5) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ValueOrBuilder getMinimumOrBuilder() {
+ if (transformTypeCase_ == 5) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+
+ public static final int APPEND_MISSING_ELEMENTS_FIELD_NUMBER = 6;
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ *
+ * @return Whether the appendMissingElements field is set.
+ */
+ @java.lang.Override
+ public boolean hasAppendMissingElements() {
+ return transformTypeCase_ == 6;
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ *
+ * @return The appendMissingElements.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ArrayValue getAppendMissingElements() {
+ if (transformTypeCase_ == 6) {
+ return (com.google.datastore.v1.ArrayValue) transformType_;
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBuilder() {
+ if (transformTypeCase_ == 6) {
+ return (com.google.datastore.v1.ArrayValue) transformType_;
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+
+ public static final int REMOVE_ALL_FROM_ARRAY_FIELD_NUMBER = 7;
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ *
+ * @return Whether the removeAllFromArray field is set.
+ */
+ @java.lang.Override
+ public boolean hasRemoveAllFromArray() {
+ return transformTypeCase_ == 7;
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ *
+ * @return The removeAllFromArray.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ArrayValue getRemoveAllFromArray() {
+ if (transformTypeCase_ == 7) {
+ return (com.google.datastore.v1.ArrayValue) transformType_;
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ArrayValueOrBuilder getRemoveAllFromArrayOrBuilder() {
+ if (transformTypeCase_ == 7) {
+ return (com.google.datastore.v1.ArrayValue) transformType_;
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+
+ 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(property_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_);
+ }
+ if (transformTypeCase_ == 2) {
+ output.writeEnum(2, ((java.lang.Integer) transformType_));
+ }
+ if (transformTypeCase_ == 3) {
+ output.writeMessage(3, (com.google.datastore.v1.Value) transformType_);
+ }
+ if (transformTypeCase_ == 4) {
+ output.writeMessage(4, (com.google.datastore.v1.Value) transformType_);
+ }
+ if (transformTypeCase_ == 5) {
+ output.writeMessage(5, (com.google.datastore.v1.Value) transformType_);
+ }
+ if (transformTypeCase_ == 6) {
+ output.writeMessage(6, (com.google.datastore.v1.ArrayValue) transformType_);
+ }
+ if (transformTypeCase_ == 7) {
+ output.writeMessage(7, (com.google.datastore.v1.ArrayValue) transformType_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(property_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_);
+ }
+ if (transformTypeCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(
+ 2, ((java.lang.Integer) transformType_));
+ }
+ if (transformTypeCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, (com.google.datastore.v1.Value) transformType_);
+ }
+ if (transformTypeCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, (com.google.datastore.v1.Value) transformType_);
+ }
+ if (transformTypeCase_ == 5) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 5, (com.google.datastore.v1.Value) transformType_);
+ }
+ if (transformTypeCase_ == 6) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 6, (com.google.datastore.v1.ArrayValue) transformType_);
+ }
+ if (transformTypeCase_ == 7) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 7, (com.google.datastore.v1.ArrayValue) transformType_);
+ }
+ 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.PropertyTransform)) {
+ return super.equals(obj);
+ }
+ com.google.datastore.v1.PropertyTransform other =
+ (com.google.datastore.v1.PropertyTransform) obj;
+
+ if (!getProperty().equals(other.getProperty())) return false;
+ if (!getTransformTypeCase().equals(other.getTransformTypeCase())) return false;
+ switch (transformTypeCase_) {
+ case 2:
+ if (getSetToServerValueValue() != other.getSetToServerValueValue()) return false;
+ break;
+ case 3:
+ if (!getIncrement().equals(other.getIncrement())) return false;
+ break;
+ case 4:
+ if (!getMaximum().equals(other.getMaximum())) return false;
+ break;
+ case 5:
+ if (!getMinimum().equals(other.getMinimum())) return false;
+ break;
+ case 6:
+ if (!getAppendMissingElements().equals(other.getAppendMissingElements())) return false;
+ break;
+ case 7:
+ if (!getRemoveAllFromArray().equals(other.getRemoveAllFromArray())) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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) + PROPERTY_FIELD_NUMBER;
+ hash = (53 * hash) + getProperty().hashCode();
+ switch (transformTypeCase_) {
+ case 2:
+ hash = (37 * hash) + SET_TO_SERVER_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getSetToServerValueValue();
+ break;
+ case 3:
+ hash = (37 * hash) + INCREMENT_FIELD_NUMBER;
+ hash = (53 * hash) + getIncrement().hashCode();
+ break;
+ case 4:
+ hash = (37 * hash) + MAXIMUM_FIELD_NUMBER;
+ hash = (53 * hash) + getMaximum().hashCode();
+ break;
+ case 5:
+ hash = (37 * hash) + MINIMUM_FIELD_NUMBER;
+ hash = (53 * hash) + getMinimum().hashCode();
+ break;
+ case 6:
+ hash = (37 * hash) + APPEND_MISSING_ELEMENTS_FIELD_NUMBER;
+ hash = (53 * hash) + getAppendMissingElements().hashCode();
+ break;
+ case 7:
+ hash = (37 * hash) + REMOVE_ALL_FROM_ARRAY_FIELD_NUMBER;
+ hash = (53 * hash) + getRemoveAllFromArray().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.datastore.v1.PropertyTransform parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PropertyTransform 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.PropertyTransform parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PropertyTransform 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.PropertyTransform parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.datastore.v1.PropertyTransform parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.datastore.v1.PropertyTransform parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PropertyTransform 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.PropertyTransform parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PropertyTransform 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.PropertyTransform parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.datastore.v1.PropertyTransform 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.PropertyTransform 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;
+ }
+ /**
+ *
+ *
+ *
+ * A transformation of an entity property.
+ *
+ *
+ * Protobuf type {@code google.datastore.v1.PropertyTransform}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The property.
+ */
+ public java.lang.String getProperty() {
+ java.lang.Object ref = property_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ property_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for property.
+ */
+ public com.google.protobuf.ByteString getPropertyBytes() {
+ java.lang.Object ref = property_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ property_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The property to set.
+ * @return This builder for chaining.
+ */
+ public Builder setProperty(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ property_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearProperty() {
+ property_ = getDefaultInstance().getProperty();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for property to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPropertyBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ property_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return Whether the setToServerValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasSetToServerValue() {
+ return transformTypeCase_ == 2;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return The enum numeric value on the wire for setToServerValue.
+ */
+ @java.lang.Override
+ public int getSetToServerValueValue() {
+ if (transformTypeCase_ == 2) {
+ return ((java.lang.Integer) transformType_).intValue();
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @param value The enum numeric value on the wire for setToServerValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSetToServerValueValue(int value) {
+ transformTypeCase_ = 2;
+ transformType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return The setToServerValue.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.PropertyTransform.ServerValue getSetToServerValue() {
+ if (transformTypeCase_ == 2) {
+ com.google.datastore.v1.PropertyTransform.ServerValue result =
+ com.google.datastore.v1.PropertyTransform.ServerValue.forNumber(
+ (java.lang.Integer) transformType_);
+ return result == null
+ ? com.google.datastore.v1.PropertyTransform.ServerValue.UNRECOGNIZED
+ : result;
+ }
+ return com.google.datastore.v1.PropertyTransform.ServerValue.SERVER_VALUE_UNSPECIFIED;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @param value The setToServerValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSetToServerValue(
+ com.google.datastore.v1.PropertyTransform.ServerValue value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ transformTypeCase_ = 2;
+ transformType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSetToServerValue() {
+ if (transformTypeCase_ == 2) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>
+ incrementBuilder_;
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ *
+ * @return Whether the increment field is set.
+ */
+ @java.lang.Override
+ public boolean hasIncrement() {
+ return transformTypeCase_ == 3;
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ *
+ * @return The increment.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Value getIncrement() {
+ if (incrementBuilder_ == null) {
+ if (transformTypeCase_ == 3) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ } else {
+ if (transformTypeCase_ == 3) {
+ return incrementBuilder_.getMessage();
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ public Builder setIncrement(com.google.datastore.v1.Value value) {
+ if (incrementBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ transformType_ = value;
+ onChanged();
+ } else {
+ incrementBuilder_.setMessage(value);
+ }
+ transformTypeCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ public Builder setIncrement(com.google.datastore.v1.Value.Builder builderForValue) {
+ if (incrementBuilder_ == null) {
+ transformType_ = builderForValue.build();
+ onChanged();
+ } else {
+ incrementBuilder_.setMessage(builderForValue.build());
+ }
+ transformTypeCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ public Builder mergeIncrement(com.google.datastore.v1.Value value) {
+ if (incrementBuilder_ == null) {
+ if (transformTypeCase_ == 3
+ && transformType_ != com.google.datastore.v1.Value.getDefaultInstance()) {
+ transformType_ =
+ com.google.datastore.v1.Value.newBuilder(
+ (com.google.datastore.v1.Value) transformType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ transformType_ = value;
+ }
+ onChanged();
+ } else {
+ if (transformTypeCase_ == 3) {
+ incrementBuilder_.mergeFrom(value);
+ } else {
+ incrementBuilder_.setMessage(value);
+ }
+ }
+ transformTypeCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ public Builder clearIncrement() {
+ if (incrementBuilder_ == null) {
+ if (transformTypeCase_ == 3) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ onChanged();
+ }
+ } else {
+ if (transformTypeCase_ == 3) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ }
+ incrementBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ public com.google.datastore.v1.Value.Builder getIncrementBuilder() {
+ return getIncrementFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ValueOrBuilder getIncrementOrBuilder() {
+ if ((transformTypeCase_ == 3) && (incrementBuilder_ != null)) {
+ return incrementBuilder_.getMessageOrBuilder();
+ } else {
+ if (transformTypeCase_ == 3) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>
+ getIncrementFieldBuilder() {
+ if (incrementBuilder_ == null) {
+ if (!(transformTypeCase_ == 3)) {
+ transformType_ = com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ incrementBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>(
+ (com.google.datastore.v1.Value) transformType_, getParentForChildren(), isClean());
+ transformType_ = null;
+ }
+ transformTypeCase_ = 3;
+ onChanged();
+ return incrementBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>
+ maximumBuilder_;
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ *
+ * @return Whether the maximum field is set.
+ */
+ @java.lang.Override
+ public boolean hasMaximum() {
+ return transformTypeCase_ == 4;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ *
+ * @return The maximum.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Value getMaximum() {
+ if (maximumBuilder_ == null) {
+ if (transformTypeCase_ == 4) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ } else {
+ if (transformTypeCase_ == 4) {
+ return maximumBuilder_.getMessage();
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ public Builder setMaximum(com.google.datastore.v1.Value value) {
+ if (maximumBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ transformType_ = value;
+ onChanged();
+ } else {
+ maximumBuilder_.setMessage(value);
+ }
+ transformTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ public Builder setMaximum(com.google.datastore.v1.Value.Builder builderForValue) {
+ if (maximumBuilder_ == null) {
+ transformType_ = builderForValue.build();
+ onChanged();
+ } else {
+ maximumBuilder_.setMessage(builderForValue.build());
+ }
+ transformTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ public Builder mergeMaximum(com.google.datastore.v1.Value value) {
+ if (maximumBuilder_ == null) {
+ if (transformTypeCase_ == 4
+ && transformType_ != com.google.datastore.v1.Value.getDefaultInstance()) {
+ transformType_ =
+ com.google.datastore.v1.Value.newBuilder(
+ (com.google.datastore.v1.Value) transformType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ transformType_ = value;
+ }
+ onChanged();
+ } else {
+ if (transformTypeCase_ == 4) {
+ maximumBuilder_.mergeFrom(value);
+ } else {
+ maximumBuilder_.setMessage(value);
+ }
+ }
+ transformTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ public Builder clearMaximum() {
+ if (maximumBuilder_ == null) {
+ if (transformTypeCase_ == 4) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ onChanged();
+ }
+ } else {
+ if (transformTypeCase_ == 4) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ }
+ maximumBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ public com.google.datastore.v1.Value.Builder getMaximumBuilder() {
+ return getMaximumFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ValueOrBuilder getMaximumOrBuilder() {
+ if ((transformTypeCase_ == 4) && (maximumBuilder_ != null)) {
+ return maximumBuilder_.getMessageOrBuilder();
+ } else {
+ if (transformTypeCase_ == 4) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>
+ getMaximumFieldBuilder() {
+ if (maximumBuilder_ == null) {
+ if (!(transformTypeCase_ == 4)) {
+ transformType_ = com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ maximumBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>(
+ (com.google.datastore.v1.Value) transformType_, getParentForChildren(), isClean());
+ transformType_ = null;
+ }
+ transformTypeCase_ = 4;
+ onChanged();
+ return maximumBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>
+ minimumBuilder_;
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ *
+ * @return Whether the minimum field is set.
+ */
+ @java.lang.Override
+ public boolean hasMinimum() {
+ return transformTypeCase_ == 5;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ *
+ * @return The minimum.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.Value getMinimum() {
+ if (minimumBuilder_ == null) {
+ if (transformTypeCase_ == 5) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ } else {
+ if (transformTypeCase_ == 5) {
+ return minimumBuilder_.getMessage();
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ public Builder setMinimum(com.google.datastore.v1.Value value) {
+ if (minimumBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ transformType_ = value;
+ onChanged();
+ } else {
+ minimumBuilder_.setMessage(value);
+ }
+ transformTypeCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ public Builder setMinimum(com.google.datastore.v1.Value.Builder builderForValue) {
+ if (minimumBuilder_ == null) {
+ transformType_ = builderForValue.build();
+ onChanged();
+ } else {
+ minimumBuilder_.setMessage(builderForValue.build());
+ }
+ transformTypeCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ public Builder mergeMinimum(com.google.datastore.v1.Value value) {
+ if (minimumBuilder_ == null) {
+ if (transformTypeCase_ == 5
+ && transformType_ != com.google.datastore.v1.Value.getDefaultInstance()) {
+ transformType_ =
+ com.google.datastore.v1.Value.newBuilder(
+ (com.google.datastore.v1.Value) transformType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ transformType_ = value;
+ }
+ onChanged();
+ } else {
+ if (transformTypeCase_ == 5) {
+ minimumBuilder_.mergeFrom(value);
+ } else {
+ minimumBuilder_.setMessage(value);
+ }
+ }
+ transformTypeCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ public Builder clearMinimum() {
+ if (minimumBuilder_ == null) {
+ if (transformTypeCase_ == 5) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ onChanged();
+ }
+ } else {
+ if (transformTypeCase_ == 5) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ }
+ minimumBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ public com.google.datastore.v1.Value.Builder getMinimumBuilder() {
+ return getMinimumFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ValueOrBuilder getMinimumOrBuilder() {
+ if ((transformTypeCase_ == 5) && (minimumBuilder_ != null)) {
+ return minimumBuilder_.getMessageOrBuilder();
+ } else {
+ if (transformTypeCase_ == 5) {
+ return (com.google.datastore.v1.Value) transformType_;
+ }
+ return com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>
+ getMinimumFieldBuilder() {
+ if (minimumBuilder_ == null) {
+ if (!(transformTypeCase_ == 5)) {
+ transformType_ = com.google.datastore.v1.Value.getDefaultInstance();
+ }
+ minimumBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.Value,
+ com.google.datastore.v1.Value.Builder,
+ com.google.datastore.v1.ValueOrBuilder>(
+ (com.google.datastore.v1.Value) transformType_, getParentForChildren(), isClean());
+ transformType_ = null;
+ }
+ transformTypeCase_ = 5;
+ onChanged();
+ return minimumBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ArrayValue,
+ com.google.datastore.v1.ArrayValue.Builder,
+ com.google.datastore.v1.ArrayValueOrBuilder>
+ appendMissingElementsBuilder_;
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ *
+ * @return Whether the appendMissingElements field is set.
+ */
+ @java.lang.Override
+ public boolean hasAppendMissingElements() {
+ return transformTypeCase_ == 6;
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ *
+ * @return The appendMissingElements.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ArrayValue getAppendMissingElements() {
+ if (appendMissingElementsBuilder_ == null) {
+ if (transformTypeCase_ == 6) {
+ return (com.google.datastore.v1.ArrayValue) transformType_;
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ } else {
+ if (transformTypeCase_ == 6) {
+ return appendMissingElementsBuilder_.getMessage();
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ public Builder setAppendMissingElements(com.google.datastore.v1.ArrayValue value) {
+ if (appendMissingElementsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ transformType_ = value;
+ onChanged();
+ } else {
+ appendMissingElementsBuilder_.setMessage(value);
+ }
+ transformTypeCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ public Builder setAppendMissingElements(
+ com.google.datastore.v1.ArrayValue.Builder builderForValue) {
+ if (appendMissingElementsBuilder_ == null) {
+ transformType_ = builderForValue.build();
+ onChanged();
+ } else {
+ appendMissingElementsBuilder_.setMessage(builderForValue.build());
+ }
+ transformTypeCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ public Builder mergeAppendMissingElements(com.google.datastore.v1.ArrayValue value) {
+ if (appendMissingElementsBuilder_ == null) {
+ if (transformTypeCase_ == 6
+ && transformType_ != com.google.datastore.v1.ArrayValue.getDefaultInstance()) {
+ transformType_ =
+ com.google.datastore.v1.ArrayValue.newBuilder(
+ (com.google.datastore.v1.ArrayValue) transformType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ transformType_ = value;
+ }
+ onChanged();
+ } else {
+ if (transformTypeCase_ == 6) {
+ appendMissingElementsBuilder_.mergeFrom(value);
+ } else {
+ appendMissingElementsBuilder_.setMessage(value);
+ }
+ }
+ transformTypeCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ public Builder clearAppendMissingElements() {
+ if (appendMissingElementsBuilder_ == null) {
+ if (transformTypeCase_ == 6) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ onChanged();
+ }
+ } else {
+ if (transformTypeCase_ == 6) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ }
+ appendMissingElementsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ public com.google.datastore.v1.ArrayValue.Builder getAppendMissingElementsBuilder() {
+ return getAppendMissingElementsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBuilder() {
+ if ((transformTypeCase_ == 6) && (appendMissingElementsBuilder_ != null)) {
+ return appendMissingElementsBuilder_.getMessageOrBuilder();
+ } else {
+ if (transformTypeCase_ == 6) {
+ return (com.google.datastore.v1.ArrayValue) transformType_;
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ArrayValue,
+ com.google.datastore.v1.ArrayValue.Builder,
+ com.google.datastore.v1.ArrayValueOrBuilder>
+ getAppendMissingElementsFieldBuilder() {
+ if (appendMissingElementsBuilder_ == null) {
+ if (!(transformTypeCase_ == 6)) {
+ transformType_ = com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+ appendMissingElementsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ArrayValue,
+ com.google.datastore.v1.ArrayValue.Builder,
+ com.google.datastore.v1.ArrayValueOrBuilder>(
+ (com.google.datastore.v1.ArrayValue) transformType_,
+ getParentForChildren(),
+ isClean());
+ transformType_ = null;
+ }
+ transformTypeCase_ = 6;
+ onChanged();
+ return appendMissingElementsBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ArrayValue,
+ com.google.datastore.v1.ArrayValue.Builder,
+ com.google.datastore.v1.ArrayValueOrBuilder>
+ removeAllFromArrayBuilder_;
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ *
+ * @return Whether the removeAllFromArray field is set.
+ */
+ @java.lang.Override
+ public boolean hasRemoveAllFromArray() {
+ return transformTypeCase_ == 7;
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ *
+ * @return The removeAllFromArray.
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ArrayValue getRemoveAllFromArray() {
+ if (removeAllFromArrayBuilder_ == null) {
+ if (transformTypeCase_ == 7) {
+ return (com.google.datastore.v1.ArrayValue) transformType_;
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ } else {
+ if (transformTypeCase_ == 7) {
+ return removeAllFromArrayBuilder_.getMessage();
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ public Builder setRemoveAllFromArray(com.google.datastore.v1.ArrayValue value) {
+ if (removeAllFromArrayBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ transformType_ = value;
+ onChanged();
+ } else {
+ removeAllFromArrayBuilder_.setMessage(value);
+ }
+ transformTypeCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ public Builder setRemoveAllFromArray(
+ com.google.datastore.v1.ArrayValue.Builder builderForValue) {
+ if (removeAllFromArrayBuilder_ == null) {
+ transformType_ = builderForValue.build();
+ onChanged();
+ } else {
+ removeAllFromArrayBuilder_.setMessage(builderForValue.build());
+ }
+ transformTypeCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ public Builder mergeRemoveAllFromArray(com.google.datastore.v1.ArrayValue value) {
+ if (removeAllFromArrayBuilder_ == null) {
+ if (transformTypeCase_ == 7
+ && transformType_ != com.google.datastore.v1.ArrayValue.getDefaultInstance()) {
+ transformType_ =
+ com.google.datastore.v1.ArrayValue.newBuilder(
+ (com.google.datastore.v1.ArrayValue) transformType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ transformType_ = value;
+ }
+ onChanged();
+ } else {
+ if (transformTypeCase_ == 7) {
+ removeAllFromArrayBuilder_.mergeFrom(value);
+ } else {
+ removeAllFromArrayBuilder_.setMessage(value);
+ }
+ }
+ transformTypeCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ public Builder clearRemoveAllFromArray() {
+ if (removeAllFromArrayBuilder_ == null) {
+ if (transformTypeCase_ == 7) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ onChanged();
+ }
+ } else {
+ if (transformTypeCase_ == 7) {
+ transformTypeCase_ = 0;
+ transformType_ = null;
+ }
+ removeAllFromArrayBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ public com.google.datastore.v1.ArrayValue.Builder getRemoveAllFromArrayBuilder() {
+ return getRemoveAllFromArrayFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ @java.lang.Override
+ public com.google.datastore.v1.ArrayValueOrBuilder getRemoveAllFromArrayOrBuilder() {
+ if ((transformTypeCase_ == 7) && (removeAllFromArrayBuilder_ != null)) {
+ return removeAllFromArrayBuilder_.getMessageOrBuilder();
+ } else {
+ if (transformTypeCase_ == 7) {
+ return (com.google.datastore.v1.ArrayValue) transformType_;
+ }
+ return com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ArrayValue,
+ com.google.datastore.v1.ArrayValue.Builder,
+ com.google.datastore.v1.ArrayValueOrBuilder>
+ getRemoveAllFromArrayFieldBuilder() {
+ if (removeAllFromArrayBuilder_ == null) {
+ if (!(transformTypeCase_ == 7)) {
+ transformType_ = com.google.datastore.v1.ArrayValue.getDefaultInstance();
+ }
+ removeAllFromArrayBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.datastore.v1.ArrayValue,
+ com.google.datastore.v1.ArrayValue.Builder,
+ com.google.datastore.v1.ArrayValueOrBuilder>(
+ (com.google.datastore.v1.ArrayValue) transformType_,
+ getParentForChildren(),
+ isClean());
+ transformType_ = null;
+ }
+ transformTypeCase_ = 7;
+ onChanged();
+ return removeAllFromArrayBuilder_;
+ }
+
+ @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.PropertyTransform)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.datastore.v1.PropertyTransform)
+ private static final com.google.datastore.v1.PropertyTransform DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.datastore.v1.PropertyTransform();
+ }
+
+ public static com.google.datastore.v1.PropertyTransform getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The property.
+ */
+ java.lang.String getProperty();
+ /**
+ *
+ *
+ *
+ * Optional. The name of the property.
+ *
+ * Property paths (a list of property names separated by dots (`.`)) may be
+ * used to refer to properties inside entity values. For example `foo.bar`
+ * means the property `bar` inside the entity property `foo`.
+ *
+ * If a property name contains a dot `.` or a backlslash `\`, then that name
+ * must be escaped.
+ *
+ *
+ * string property = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for property.
+ */
+ com.google.protobuf.ByteString getPropertyBytes();
+
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return Whether the setToServerValue field is set.
+ */
+ boolean hasSetToServerValue();
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return The enum numeric value on the wire for setToServerValue.
+ */
+ int getSetToServerValueValue();
+ /**
+ *
+ *
+ *
+ * Sets the property to the given server value.
+ *
+ *
+ * .google.datastore.v1.PropertyTransform.ServerValue set_to_server_value = 2;
+ *
+ * @return The setToServerValue.
+ */
+ com.google.datastore.v1.PropertyTransform.ServerValue getSetToServerValue();
+
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ *
+ * @return Whether the increment field is set.
+ */
+ boolean hasIncrement();
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ *
+ * @return The increment.
+ */
+ com.google.datastore.v1.Value getIncrement();
+ /**
+ *
+ *
+ *
+ * Adds the given value to the property's current value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If either of the given value or the current property value are doubles,
+ * both values will be interpreted as doubles. Double arithmetic and
+ * representation of double values follows IEEE 754 semantics.
+ * If there is positive/negative integer overflow, the property is resolved
+ * to the largest magnitude positive/negative integer.
+ *
+ *
+ * .google.datastore.v1.Value increment = 3;
+ */
+ com.google.datastore.v1.ValueOrBuilder getIncrementOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ *
+ * @return Whether the maximum field is set.
+ */
+ boolean hasMaximum();
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ *
+ * @return The maximum.
+ */
+ com.google.datastore.v1.Value getMaximum();
+ /**
+ *
+ *
+ *
+ * Sets the property to the maximum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the given value.
+ * If a maximum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the larger operand. If the operands are
+ * equivalent (e.g. 3 and 3.0), the property does not change.
+ * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
+ * zero input value is always the stored value.
+ * The maximum of any numeric value x and NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value maximum = 4;
+ */
+ com.google.datastore.v1.ValueOrBuilder getMaximumOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ *
+ * @return Whether the minimum field is set.
+ */
+ boolean hasMinimum();
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ *
+ * @return The minimum.
+ */
+ com.google.datastore.v1.Value getMinimum();
+ /**
+ *
+ *
+ *
+ * Sets the property to the minimum of its current value and the given
+ * value.
+ *
+ * This must be an integer or a double value.
+ * If the property is not an integer or double, or if the property does not
+ * yet exist, the transformation will set the property to the input value.
+ * If a minimum operation is applied where the property and the input value
+ * are of mixed types (that is - one is an integer and one is a double)
+ * the property takes on the type of the smaller operand. If the operands
+ * are equivalent (e.g. 3 and 3.0), the property does not change. 0, 0.0,
+ * and -0.0 are all zero. The minimum of a zero stored value and zero input
+ * value is always the stored value. The minimum of any numeric value x and
+ * NaN is NaN.
+ *
+ *
+ * .google.datastore.v1.Value minimum = 5;
+ */
+ com.google.datastore.v1.ValueOrBuilder getMinimumOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ *
+ * @return Whether the appendMissingElements field is set.
+ */
+ boolean hasAppendMissingElements();
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ *
+ * @return The appendMissingElements.
+ */
+ com.google.datastore.v1.ArrayValue getAppendMissingElements();
+ /**
+ *
+ *
+ *
+ * Appends the given elements in order if they are not already present in
+ * the current property value.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is first set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when checking if a value is missing.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * If the input contains multiple equivalent values, only the first will
+ * be considered.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue append_missing_elements = 6;
+ */
+ com.google.datastore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ *
+ * @return Whether the removeAllFromArray field is set.
+ */
+ boolean hasRemoveAllFromArray();
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ *
+ * @return The removeAllFromArray.
+ */
+ com.google.datastore.v1.ArrayValue getRemoveAllFromArray();
+ /**
+ *
+ *
+ *
+ * Removes all of the given elements from the array in the property.
+ * If the property is not an array, or if the property does not yet exist,
+ * it is set to the empty array.
+ *
+ * Equivalent numbers of different types (e.g. 3L and 3.0) are
+ * considered equal when deciding whether an element should be removed.
+ * NaN is equal to NaN, and the null value is equal to the null value.
+ * This will remove all equivalent values if there are duplicates.
+ *
+ * The corresponding transform result will be the null value.
+ *
+ *
+ * .google.datastore.v1.ArrayValue remove_all_from_array = 7;
+ */
+ com.google.datastore.v1.ArrayValueOrBuilder getRemoveAllFromArrayOrBuilder();
+
+ com.google.datastore.v1.PropertyTransform.TransformTypeCase getTransformTypeCase();
+}
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Query.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Query.java
index a91fd271e..2c0c40f79 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Query.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Query.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
/**
diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryOrBuilder.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryOrBuilder.java
index 5783fb2ea..70533577f 100644
--- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryOrBuilder.java
+++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/QueryOrBuilder.java
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public interface QueryOrBuilder
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
index 1e34aa95a..83e5d1763 100644
--- 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
@@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/query_profile.proto
-// Protobuf Java Version: 3.25.3
+// Protobuf Java Version: 3.25.5
package com.google.datastore.v1;
public final class QueryProfileProto {
@@ -67,12 +67,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\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