public final class Mutation extends GeneratedMessageV3 implements MutationOrBuilder
A mutation to apply to an entity.
Protobuf type google.datastore.v1.Mutation
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
BASE_VERSION_FIELD_NUMBER
public static final int BASE_VERSION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
CONFLICT_RESOLUTION_STRATEGY_FIELD_NUMBER
public static final int CONFLICT_RESOLUTION_STRATEGY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DELETE_FIELD_NUMBER
public static final int DELETE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
INSERT_FIELD_NUMBER
public static final int INSERT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PROPERTY_MASK_FIELD_NUMBER
public static final int PROPERTY_MASK_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int PROPERTY_TRANSFORMS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
UPDATE_FIELD_NUMBER
public static final int UPDATE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
UPSERT_FIELD_NUMBER
public static final int UPSERT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Mutation getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Mutation.Builder newBuilder()
newBuilder(Mutation prototype)
public static Mutation.Builder newBuilder(Mutation prototype)
Parameter |
Name |
Description |
prototype |
Mutation
|
public static Mutation parseDelimitedFrom(InputStream input)
public static Mutation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Mutation parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Mutation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Mutation parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Mutation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Mutation parseFrom(CodedInputStream input)
public static Mutation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Mutation parseFrom(InputStream input)
public static Mutation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Mutation parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Mutation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Mutation> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getBaseVersion()
public long getBaseVersion()
The version of the entity that this mutation is being applied
to. If this does not match the current version on the server, the
mutation conflicts.
int64 base_version = 8;
Returns |
Type |
Description |
long |
The baseVersion.
|
getConflictDetectionStrategyCase()
public Mutation.ConflictDetectionStrategyCase getConflictDetectionStrategyCase()
getConflictResolutionStrategy()
public Mutation.ConflictResolutionStrategy getConflictResolutionStrategy()
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;
getConflictResolutionStrategyValue()
public 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;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for conflictResolutionStrategy.
|
getDefaultInstanceForType()
public Mutation getDefaultInstanceForType()
getDelete()
The key of the entity to delete. The entity may or may not already exist.
Must have a complete key path and must not be reserved/read-only.
.google.datastore.v1.Key delete = 7;
Returns |
Type |
Description |
Key |
The delete.
|
getDeleteOrBuilder()
public KeyOrBuilder getDeleteOrBuilder()
The key of the entity to delete. The entity may or may not already exist.
Must have a complete key path and must not be reserved/read-only.
.google.datastore.v1.Key delete = 7;
getInsert()
public Entity getInsert()
The entity to insert. The entity must not already exist.
The entity key's final path element may be incomplete.
.google.datastore.v1.Entity insert = 4;
Returns |
Type |
Description |
Entity |
The insert.
|
getInsertOrBuilder()
public EntityOrBuilder getInsertOrBuilder()
The entity to insert. The entity must not already exist.
The entity key's final path element may be incomplete.
.google.datastore.v1.Entity insert = 4;
getOperationCase()
public Mutation.OperationCase getOperationCase()
getParserForType()
public Parser<Mutation> getParserForType()
Overrides
getPropertyMask()
public PropertyMask getPropertyMask()
The properties to write in this mutation.
None of the properties in the mask may have a reserved name, except for
key
.
This field is ignored for delete
.
If the entity already exists, only properties referenced in the mask are
updated, others are left untouched.
Properties referenced in the mask but not in the entity are deleted.
.google.datastore.v1.PropertyMask property_mask = 9;
getPropertyMaskOrBuilder()
public PropertyMaskOrBuilder getPropertyMaskOrBuilder()
The properties to write in this mutation.
None of the properties in the mask may have a reserved name, except for
key
.
This field is ignored for delete
.
If the entity already exists, only properties referenced in the mask are
updated, others are left untouched.
Properties referenced in the mask but not in the entity are deleted.
.google.datastore.v1.PropertyMask property_mask = 9;
public 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];
Parameter |
Name |
Description |
index |
int
|
public 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];
Returns |
Type |
Description |
int |
|
public List<PropertyTransform> getPropertyTransformsList()
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 PropertyTransformOrBuilder getPropertyTransformsOrBuilder(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];
Parameter |
Name |
Description |
index |
int
|
public List<? extends 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];
Returns |
Type |
Description |
List<? extends com.google.datastore.v1.PropertyTransformOrBuilder> |
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getUpdate()
public Entity getUpdate()
The entity to update. The entity must already exist.
Must have a complete key path.
.google.datastore.v1.Entity update = 5;
Returns |
Type |
Description |
Entity |
The update.
|
getUpdateOrBuilder()
public EntityOrBuilder getUpdateOrBuilder()
The entity to update. The entity must already exist.
Must have a complete key path.
.google.datastore.v1.Entity update = 5;
getUpdateTime()
public Timestamp getUpdateTime()
The update time of the entity that this mutation is being applied
to. If this does not match the current update time on the server, the
mutation conflicts.
.google.protobuf.Timestamp update_time = 11;
Returns |
Type |
Description |
Timestamp |
The updateTime.
|
getUpdateTimeOrBuilder()
public TimestampOrBuilder getUpdateTimeOrBuilder()
The update time of the entity that this mutation is being applied
to. If this does not match the current update time on the server, the
mutation conflicts.
.google.protobuf.Timestamp update_time = 11;
getUpsert()
public Entity getUpsert()
The entity to upsert. The entity may or may not already exist.
The entity key's final path element may be incomplete.
.google.datastore.v1.Entity upsert = 6;
Returns |
Type |
Description |
Entity |
The upsert.
|
getUpsertOrBuilder()
public EntityOrBuilder getUpsertOrBuilder()
The entity to upsert. The entity may or may not already exist.
The entity key's final path element may be incomplete.
.google.datastore.v1.Entity upsert = 6;
hasBaseVersion()
public boolean hasBaseVersion()
The version of the entity that this mutation is being applied
to. If this does not match the current version on the server, the
mutation conflicts.
int64 base_version = 8;
Returns |
Type |
Description |
boolean |
Whether the baseVersion field is set.
|
hasDelete()
public boolean hasDelete()
The key of the entity to delete. The entity may or may not already exist.
Must have a complete key path and must not be reserved/read-only.
.google.datastore.v1.Key delete = 7;
Returns |
Type |
Description |
boolean |
Whether the delete field is set.
|
hasInsert()
public boolean hasInsert()
The entity to insert. The entity must not already exist.
The entity key's final path element may be incomplete.
.google.datastore.v1.Entity insert = 4;
Returns |
Type |
Description |
boolean |
Whether the insert field is set.
|
hasPropertyMask()
public boolean hasPropertyMask()
The properties to write in this mutation.
None of the properties in the mask may have a reserved name, except for
key
.
This field is ignored for delete
.
If the entity already exists, only properties referenced in the mask are
updated, others are left untouched.
Properties referenced in the mask but not in the entity are deleted.
.google.datastore.v1.PropertyMask property_mask = 9;
Returns |
Type |
Description |
boolean |
Whether the propertyMask field is set.
|
hasUpdate()
public boolean hasUpdate()
The entity to update. The entity must already exist.
Must have a complete key path.
.google.datastore.v1.Entity update = 5;
Returns |
Type |
Description |
boolean |
Whether the update field is set.
|
hasUpdateTime()
public boolean hasUpdateTime()
The update time of the entity that this mutation is being applied
to. If this does not match the current update time on the server, the
mutation conflicts.
.google.protobuf.Timestamp update_time = 11;
Returns |
Type |
Description |
boolean |
Whether the updateTime field is set.
|
hasUpsert()
public boolean hasUpsert()
The entity to upsert. The entity may or may not already exist.
The entity key's final path element may be incomplete.
.google.datastore.v1.Entity upsert = 6;
Returns |
Type |
Description |
boolean |
Whether the upsert field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Mutation.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Mutation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Mutation.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides