Class Mutation (2.20.1)

public final class Mutation extends GeneratedMessageV3 implements MutationOrBuilder

A mutation to apply to an entity.

Protobuf type google.datastore.v1.Mutation

Implements

MutationOrBuilder

Static Fields

BASE_VERSION_FIELD_NUMBER

public static final int BASE_VERSION_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

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()
Returns
Type Description
Mutation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Mutation.Builder newBuilder()
Returns
Type Description
Mutation.Builder

newBuilder(Mutation prototype)

public static Mutation.Builder newBuilder(Mutation prototype)
Parameter
Name Description
prototype Mutation
Returns
Type Description
Mutation.Builder

parseDelimitedFrom(InputStream input)

public static Mutation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Mutation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Mutation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Mutation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Mutation parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Mutation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Mutation parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Mutation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Mutation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Mutation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Mutation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Mutation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Mutation> parser()
Returns
Type Description
Parser<Mutation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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()
Returns
Type Description
Mutation.ConflictDetectionStrategyCase

getDefaultInstanceForType()

public Mutation getDefaultInstanceForType()
Returns
Type Description
Mutation

getDelete()

public Key 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;

Returns
Type Description
KeyOrBuilder

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;

Returns
Type Description
EntityOrBuilder

getOperationCase()

public Mutation.OperationCase getOperationCase()
Returns
Type Description
Mutation.OperationCase

getParserForType()

public Parser<Mutation> getParserForType()
Returns
Type Description
Parser<Mutation>
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;

Returns
Type Description
PropertyMask

The propertyMask.

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;

Returns
Type Description
PropertyMaskOrBuilder

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;

Returns
Type Description
EntityOrBuilder

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;

Returns
Type Description
TimestampOrBuilder

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;

Returns
Type Description
EntityOrBuilder

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()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Mutation.Builder newBuilderForType()
Returns
Type Description
Mutation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Mutation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Mutation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Mutation.Builder toBuilder()
Returns
Type Description
Mutation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException