diff --git a/README.md b/README.md index da7d93a81..d5e61c715 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.47.0') +implementation platform('com.google.cloud:libraries-bom:26.48.0') implementation 'com.google.cloud:google-cloud-datastore' ``` diff --git a/generation_config.yaml b/generation_config.yaml index bff4d8b41..44eb5d8aa 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ -gapic_generator_version: 2.46.1 -googleapis_commitish: d6f184876ec67295addccbb70aa4af622e049a7e -libraries_bom_version: 26.47.0 +gapic_generator_version: 2.47.0 +googleapis_commitish: 8692273ae7e0ef95d264e1bb8bcb900fa950674f +libraries_bom_version: 26.48.0 libraries: - api_shortname: datastore name_pretty: Cloud Datastore diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java index 851692f0f..b186c25f0 100644 --- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java +++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/DatastoreProto.java @@ -96,6 +96,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_datastore_v1_Mutation_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_datastore_v1_Mutation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_datastore_v1_PropertyTransform_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_datastore_v1_PropertyTransform_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_datastore_v1_MutationResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -208,87 +212,106 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v1.Key\"n\n\021ReserveIdsRequest\022\027\n\nproject_i" + "d\030\010 \001(\tB\003\340A\002\022\023\n\013database_id\030\t \001(\t\022+\n\004key" + "s\030\001 \003(\0132\030.google.datastore.v1.KeyB\003\340A\002\"\024" - + "\n\022ReserveIdsResponse\"\364\002\n\010Mutation\022-\n\006ins" + + "\n\022ReserveIdsResponse\"\362\004\n\010Mutation\022-\n\006ins" + "ert\030\004 \001(\0132\033.google.datastore.v1.EntityH\000" + "\022-\n\006update\030\005 \001(\0132\033.google.datastore.v1.E" + "ntityH\000\022-\n\006upsert\030\006 \001(\0132\033.google.datasto" + "re.v1.EntityH\000\022*\n\006delete\030\007 \001(\0132\030.google." + "datastore.v1.KeyH\000\022\026\n\014base_version\030\010 \001(\003" + "H\001\0221\n\013update_time\030\013 \001(\0132\032.google.protobu" - + "f.TimestampH\001\0228\n\rproperty_mask\030\t \001(\0132!.g" - + "oogle.datastore.v1.PropertyMaskB\013\n\topera" - + "tionB\035\n\033conflict_detection_strategy\"\305\001\n\016" - + "MutationResult\022%\n\003key\030\003 \001(\0132\030.google.dat" - + "astore.v1.Key\022\017\n\007version\030\004 \001(\003\022/\n\013create" - + "_time\030\007 \001(\0132\032.google.protobuf.Timestamp\022" - + "/\n\013update_time\030\006 \001(\0132\032.google.protobuf.T" - + "imestamp\022\031\n\021conflict_detected\030\005 \001(\010\"\035\n\014P" - + "ropertyMask\022\r\n\005paths\030\001 \003(\t\"\312\002\n\013ReadOptio" - + "ns\022L\n\020read_consistency\030\001 \001(\01620.google.da" - + "tastore.v1.ReadOptions.ReadConsistencyH\000" - + "\022\025\n\013transaction\030\002 \001(\014H\000\022B\n\017new_transacti" - + "on\030\003 \001(\0132\'.google.datastore.v1.Transacti" - + "onOptionsH\000\022/\n\tread_time\030\004 \001(\0132\032.google." - + "protobuf.TimestampH\000\"M\n\017ReadConsistency\022" - + " \n\034READ_CONSISTENCY_UNSPECIFIED\020\000\022\n\n\006STR" - + "ONG\020\001\022\014\n\010EVENTUAL\020\002B\022\n\020consistency_type\"" - + "\222\002\n\022TransactionOptions\022G\n\nread_write\030\001 \001" - + "(\01321.google.datastore.v1.TransactionOpti" - + "ons.ReadWriteH\000\022E\n\tread_only\030\002 \001(\01320.goo" - + "gle.datastore.v1.TransactionOptions.Read" - + "OnlyH\000\032)\n\tReadWrite\022\034\n\024previous_transact" - + "ion\030\001 \001(\014\0329\n\010ReadOnly\022-\n\tread_time\030\001 \001(\013" - + "2\032.google.protobuf.TimestampB\006\n\004mode2\341\r\n" - + "\tDatastore\022\300\001\n\006Lookup\022\".google.datastore" - + ".v1.LookupRequest\032#.google.datastore.v1." - + "LookupResponse\"m\332A\034project_id,read_optio" - + "ns,keys\202\323\344\223\002%\" /v1/projects/{project_id}" - + ":lookup:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013databa" - + "se_id\022\251\001\n\010RunQuery\022$.google.datastore.v1" - + ".RunQueryRequest\032%.google.datastore.v1.R" - + "unQueryResponse\"P\202\323\344\223\002\'\"\"/v1/projects/{p" - + "roject_id}:runQuery:\001*\212\323\344\223\002\035\022\014\n\nproject_" - + "id\022\r\n\013database_id\022\325\001\n\023RunAggregationQuer" - + "y\022/.google.datastore.v1.RunAggregationQu" - + "eryRequest\0320.google.datastore.v1.RunAggr" - + "egationQueryResponse\"[\202\323\344\223\0022\"-/v1/projec" - + "ts/{project_id}:runAggregationQuery:\001*\212\323" - + "\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id\022\326\001\n\020Be" - + "ginTransaction\022,.google.datastore.v1.Beg" - + "inTransactionRequest\032-.google.datastore." - + "v1.BeginTransactionResponse\"e\332A\nproject_" - + "id\202\323\344\223\002/\"*/v1/projects/{project_id}:begi" - + "nTransaction:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013d" - + "atabase_id\022\346\001\n\006Commit\022\".google.datastore" - + ".v1.CommitRequest\032#.google.datastore.v1." - + "CommitResponse\"\222\001\332A%project_id,mode,tran" - + "saction,mutations\332A\031project_id,mode,muta" - + "tions\202\323\344\223\002%\" /v1/projects/{project_id}:c" - + "ommit:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database" - + "_id\022\302\001\n\010Rollback\022$.google.datastore.v1.R" - + "ollbackRequest\032%.google.datastore.v1.Rol" - + "lbackResponse\"i\332A\026project_id,transaction" - + "\202\323\344\223\002\'\"\"/v1/projects/{project_id}:rollba" - + "ck:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id" - + "\022\307\001\n\013AllocateIds\022\'.google.datastore.v1.A" - + "llocateIdsRequest\032(.google.datastore.v1." - + "AllocateIdsResponse\"e\332A\017project_id,keys\202" - + "\323\344\223\002*\"%/v1/projects/{project_id}:allocat" - + "eIds:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_" - + "id\022\303\001\n\nReserveIds\022&.google.datastore.v1." - + "ReserveIdsRequest\032\'.google.datastore.v1." - + "ReserveIdsResponse\"d\332A\017project_id,keys\202\323" - + "\344\223\002)\"$/v1/projects/{project_id}:reserveI" - + "ds:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id" - + "\032v\312A\030datastore.googleapis.com\322AXhttps://" - + "www.googleapis.com/auth/cloud-platform,h" - + "ttps://www.googleapis.com/auth/datastore" - + "B\277\001\n\027com.google.datastore.v1B\016DatastoreP" - + "rotoP\001Z;cloud.google.com/go/datastore/ap" - + "iv1/datastorepb;datastorepb\252\002\031Google.Clo" - + "ud.Datastore.V1\312\002\031Google\\Cloud\\Datastore" - + "\\V1\352\002\034Google::Cloud::Datastore::V1b\006prot" - + "o3" + + "f.TimestampH\001\022^\n\034conflict_resolution_str" + + "ategy\030\n \001(\01628.google.datastore.v1.Mutati" + + "on.ConflictResolutionStrategy\0228\n\rpropert" + + "y_mask\030\t \001(\0132!.google.datastore.v1.Prope" + + "rtyMask\022H\n\023property_transforms\030\014 \003(\0132&.g" + + "oogle.datastore.v1.PropertyTransformB\003\340A" + + "\001\"R\n\032ConflictResolutionStrategy\022\030\n\024STRAT" + + "EGY_UNSPECIFIED\020\000\022\020\n\014SERVER_VALUE\020\001\022\010\n\004F" + + "AIL\020\003B\013\n\toperationB\035\n\033conflict_detection" + + "_strategy\"\343\003\n\021PropertyTransform\022\025\n\010prope" + + "rty\030\001 \001(\tB\003\340A\001\022Q\n\023set_to_server_value\030\002 " + + "\001(\01622.google.datastore.v1.PropertyTransf" + + "orm.ServerValueH\000\022/\n\tincrement\030\003 \001(\0132\032.g" + + "oogle.datastore.v1.ValueH\000\022-\n\007maximum\030\004 " + + "\001(\0132\032.google.datastore.v1.ValueH\000\022-\n\007min" + + "imum\030\005 \001(\0132\032.google.datastore.v1.ValueH\000" + + "\022B\n\027append_missing_elements\030\006 \001(\0132\037.goog" + + "le.datastore.v1.ArrayValueH\000\022@\n\025remove_a" + + "ll_from_array\030\007 \001(\0132\037.google.datastore.v" + + "1.ArrayValueH\000\"=\n\013ServerValue\022\034\n\030SERVER_" + + "VALUE_UNSPECIFIED\020\000\022\020\n\014REQUEST_TIME\020\001B\020\n" + + "\016transform_type\"\374\001\n\016MutationResult\022%\n\003ke" + + "y\030\003 \001(\0132\030.google.datastore.v1.Key\022\017\n\007ver" + + "sion\030\004 \001(\003\022/\n\013create_time\030\007 \001(\0132\032.google" + + ".protobuf.Timestamp\022/\n\013update_time\030\006 \001(\013" + + "2\032.google.protobuf.Timestamp\022\031\n\021conflict" + + "_detected\030\005 \001(\010\0225\n\021transform_results\030\010 \003" + + "(\0132\032.google.datastore.v1.Value\"\035\n\014Proper" + + "tyMask\022\r\n\005paths\030\001 \003(\t\"\312\002\n\013ReadOptions\022L\n" + + "\020read_consistency\030\001 \001(\01620.google.datasto" + + "re.v1.ReadOptions.ReadConsistencyH\000\022\025\n\013t" + + "ransaction\030\002 \001(\014H\000\022B\n\017new_transaction\030\003 " + + "\001(\0132\'.google.datastore.v1.TransactionOpt" + + "ionsH\000\022/\n\tread_time\030\004 \001(\0132\032.google.proto" + + "buf.TimestampH\000\"M\n\017ReadConsistency\022 \n\034RE" + + "AD_CONSISTENCY_UNSPECIFIED\020\000\022\n\n\006STRONG\020\001" + + "\022\014\n\010EVENTUAL\020\002B\022\n\020consistency_type\"\222\002\n\022T" + + "ransactionOptions\022G\n\nread_write\030\001 \001(\01321." + + "google.datastore.v1.TransactionOptions.R" + + "eadWriteH\000\022E\n\tread_only\030\002 \001(\01320.google.d" + + "atastore.v1.TransactionOptions.ReadOnlyH" + + "\000\032)\n\tReadWrite\022\034\n\024previous_transaction\030\001" + + " \001(\014\0329\n\010ReadOnly\022-\n\tread_time\030\001 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\006\n\004mode2\341\r\n\tData" + + "store\022\300\001\n\006Lookup\022\".google.datastore.v1.L" + + "ookupRequest\032#.google.datastore.v1.Looku" + + "pResponse\"m\332A\034project_id,read_options,ke" + + "ys\202\323\344\223\002%\" /v1/projects/{project_id}:look" + + "up:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id" + + "\022\251\001\n\010RunQuery\022$.google.datastore.v1.RunQ" + + "ueryRequest\032%.google.datastore.v1.RunQue" + + "ryResponse\"P\202\323\344\223\002\'\"\"/v1/projects/{projec" + + "t_id}:runQuery:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n" + + "\013database_id\022\325\001\n\023RunAggregationQuery\022/.g" + + "oogle.datastore.v1.RunAggregationQueryRe" + + "quest\0320.google.datastore.v1.RunAggregati" + + "onQueryResponse\"[\202\323\344\223\0022\"-/v1/projects/{p" + + "roject_id}:runAggregationQuery:\001*\212\323\344\223\002\035\022" + + "\014\n\nproject_id\022\r\n\013database_id\022\326\001\n\020BeginTr" + + "ansaction\022,.google.datastore.v1.BeginTra" + + "nsactionRequest\032-.google.datastore.v1.Be" + + "ginTransactionResponse\"e\332A\nproject_id\202\323\344" + + "\223\002/\"*/v1/projects/{project_id}:beginTran" + + "saction:\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013databa" + + "se_id\022\346\001\n\006Commit\022\".google.datastore.v1.C" + + "ommitRequest\032#.google.datastore.v1.Commi" + + "tResponse\"\222\001\332A%project_id,mode,transacti" + + "on,mutations\332A\031project_id,mode,mutations" + + "\202\323\344\223\002%\" /v1/projects/{project_id}:commit" + + ":\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id\022\302" + + "\001\n\010Rollback\022$.google.datastore.v1.Rollba" + + "ckRequest\032%.google.datastore.v1.Rollback" + + "Response\"i\332A\026project_id,transaction\202\323\344\223\002" + + "\'\"\"/v1/projects/{project_id}:rollback:\001*" + + "\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id\022\307\001\n\013" + + "AllocateIds\022\'.google.datastore.v1.Alloca" + + "teIdsRequest\032(.google.datastore.v1.Alloc" + + "ateIdsResponse\"e\332A\017project_id,keys\202\323\344\223\002*" + + "\"%/v1/projects/{project_id}:allocateIds:" + + "\001*\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id\022\303\001" + + "\n\nReserveIds\022&.google.datastore.v1.Reser" + + "veIdsRequest\032\'.google.datastore.v1.Reser" + + "veIdsResponse\"d\332A\017project_id,keys\202\323\344\223\002)\"" + + "$/v1/projects/{project_id}:reserveIds:\001*" + + "\212\323\344\223\002\035\022\014\n\nproject_id\022\r\n\013database_id\032v\312A\030" + + "datastore.googleapis.com\322AXhttps://www.g" + + "oogleapis.com/auth/cloud-platform,https:" + + "//www.googleapis.com/auth/datastoreB\277\001\n\027" + + "com.google.datastore.v1B\016DatastoreProtoP" + + "\001Z;cloud.google.com/go/datastore/apiv1/d" + + "atastorepb;datastorepb\252\002\031Google.Cloud.Da" + + "tastore.V1\312\002\031Google\\Cloud\\Datastore\\V1\352\002" + + "\034Google::Cloud::Datastore::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -461,20 +484,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Delete", "BaseVersion", "UpdateTime", + "ConflictResolutionStrategy", "PropertyMask", + "PropertyTransforms", "Operation", "ConflictDetectionStrategy", }); - internal_static_google_datastore_v1_MutationResult_descriptor = + internal_static_google_datastore_v1_PropertyTransform_descriptor = getDescriptor().getMessageTypes().get(17); + internal_static_google_datastore_v1_PropertyTransform_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_datastore_v1_PropertyTransform_descriptor, + new java.lang.String[] { + "Property", + "SetToServerValue", + "Increment", + "Maximum", + "Minimum", + "AppendMissingElements", + "RemoveAllFromArray", + "TransformType", + }); + internal_static_google_datastore_v1_MutationResult_descriptor = + getDescriptor().getMessageTypes().get(18); internal_static_google_datastore_v1_MutationResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_datastore_v1_MutationResult_descriptor, new java.lang.String[] { - "Key", "Version", "CreateTime", "UpdateTime", "ConflictDetected", + "Key", "Version", "CreateTime", "UpdateTime", "ConflictDetected", "TransformResults", }); internal_static_google_datastore_v1_PropertyMask_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_datastore_v1_PropertyMask_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_datastore_v1_PropertyMask_descriptor, @@ -482,7 +522,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Paths", }); internal_static_google_datastore_v1_ReadOptions_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_datastore_v1_ReadOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_datastore_v1_ReadOptions_descriptor, @@ -490,7 +530,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReadConsistency", "Transaction", "NewTransaction", "ReadTime", "ConsistencyType", }); internal_static_google_datastore_v1_TransactionOptions_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_datastore_v1_TransactionOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_datastore_v1_TransactionOptions_descriptor, diff --git a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java index 71c310516..ff6a54f5b 100644 --- a/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java +++ b/proto-google-cloud-datastore-v1/src/main/java/com/google/datastore/v1/Mutation.java @@ -38,7 +38,10 @@ private Mutation(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } - private Mutation() {} + private Mutation() { + conflictResolutionStrategy_ = 0; + propertyTransforms_ = java.util.Collections.emptyList(); + } @java.lang.Override @SuppressWarnings({"unused"}) @@ -60,6 +63,166 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.datastore.v1.Mutation.class, com.google.datastore.v1.Mutation.Builder.class); } + /** + * + * + *
+ * 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 03e96876d..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
@@ -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/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/proto/google/datastore/v1/datastore.proto b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
index 9c44501af..c0683b9ba 100644
--- a/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
+++ b/proto-google-cloud-datastore-v1/src/main/proto/google/datastore/v1/datastore.proto
@@ -501,6 +501,18 @@ message ReserveIdsResponse {}
// A mutation to apply to an entity.
message Mutation {
+ // The possible ways to resolve a conflict detected in a mutation.
+ enum ConflictResolutionStrategy {
+ // Unspecified. Defaults to `SERVER_VALUE`.
+ STRATEGY_UNSPECIFIED = 0;
+
+ // The server entity is kept.
+ SERVER_VALUE = 1;
+
+ // The whole commit request fails.
+ FAIL = 3;
+ }
+
// The mutation operation.
//
// For `insert`, `update`, and `upsert`:
@@ -542,6 +554,11 @@ message Mutation {
google.protobuf.Timestamp update_time = 11;
}
+ // 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.
+ ConflictResolutionStrategy conflict_resolution_strategy = 10;
+
// The properties to write in this mutation.
// None of the properties in the mask may have a reserved name, except for
// `__key__`.
@@ -551,6 +568,112 @@ message Mutation {
// updated, others are left untouched.
// Properties referenced in the mask but not in the entity are deleted.
PropertyMask property_mask = 9;
+
+ // 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 PropertyTransform property_transforms = 12
+ [(google.api.field_behavior) = OPTIONAL];
+}
+
+// A transformation of an entity property.
+message PropertyTransform {
+ // A value that is calculated by the server.
+ enum ServerValue {
+ // Unspecified. This value must not be used.
+ 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;
+ }
+
+ // 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];
+
+ // The transformation to apply to the property.
+ oneof transform_type {
+ // Sets the property to the given server value.
+ ServerValue set_to_server_value = 2;
+
+ // 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.
+ Value increment = 3;
+
+ // 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.
+ Value maximum = 4;
+
+ // 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.
+ Value minimum = 5;
+
+ // 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.
+ ArrayValue append_missing_elements = 6;
+
+ // 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.
+ ArrayValue remove_all_from_array = 7;
+ }
}
// The result of applying a mutation.
@@ -578,6 +701,11 @@ message MutationResult {
// Whether a conflict was detected for this mutation. Always false when a
// conflict detection strategy field is not set in the mutation.
bool conflict_detected = 5;
+
+ // The results of applying each
+ // [PropertyTransform][google.datastore.v1.PropertyTransform], in the same
+ // order of the request.
+ repeated Value transform_results = 8;
}
// The set of arbitrarily nested property paths used to restrict an operation to
@@ -611,16 +739,13 @@ message ReadOptions {
EVENTUAL = 2;
}
- // For Cloud Datastore, if read_consistency is not specified, then lookups and
- // ancestor queries default to `read_consistency`=`STRONG`, global queries
- // default to `read_consistency`=`EVENTUAL`.
- //
- // For Cloud Firestore in Datastore mode, if read_consistency is not specified
- // then lookups and all queries default to `read_consistency`=`STRONG`.
+ // For Cloud Firestore in Datastore mode, if you don't specify
+ // read_consistency then all lookups and queries default to
+ // `read_consistency`=`STRONG`. Note that, in Cloud Datastore, global queries
+ // defaulted to `read_consistency`=`EVENTUAL`.
//
// Explicitly setting `read_consistency`=`EVENTUAL` will result in eventually
- // consistent lookups & queries in both Cloud Datastore & Cloud Firestore in
- // Datastore mode.
+ // consistent lookups and queries.
oneof consistency_type {
// The non-transactional read consistency to use.
ReadConsistency read_consistency = 1;
diff --git a/renovate.json b/renovate.json
index 586208852..b3314f4b2 100644
--- a/renovate.json
+++ b/renovate.json
@@ -41,6 +41,16 @@
],
"depNameTemplate": "com.google.cloud:sdk-platform-java-config",
"datasourceTemplate": "maven"
+ },
+ {
+ "fileMatch": [
+ "^.github/workflows/hermetic_library_generation.yaml$"
+ ],
+ "matchStrings": [
+ "uses: googleapis/sdk-platform-java/.github/scripts@v(?