Class Mutation (2.21.3)

publicfinalclass MutationextendsGeneratedMessageV3implementsMutationOrBuilder

A mutation to apply to an entity.

Protobuf type google.datastore.v1.Mutation

Implements

MutationOrBuilder

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

publicstaticfinalintBASE_VERSION_FIELD_NUMBER
Field Value
Type Description
int

DELETE_FIELD_NUMBER

publicstaticfinalintDELETE_FIELD_NUMBER
Field Value
Type Description
int

INSERT_FIELD_NUMBER

publicstaticfinalintINSERT_FIELD_NUMBER
Field Value
Type Description
int

PROPERTY_MASK_FIELD_NUMBER

publicstaticfinalintPROPERTY_MASK_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_FIELD_NUMBER

publicstaticfinalintUPDATE_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

publicstaticfinalintUPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

UPSERT_FIELD_NUMBER

publicstaticfinalintUPSERT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticMutationgetDefaultInstance()
Returns
Type Description
Mutation

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticMutation.BuildernewBuilder()
Returns
Type Description
Mutation.Builder

newBuilder(Mutation prototype)

publicstaticMutation.BuildernewBuilder(Mutationprototype)
Parameter
Name Description
prototype Mutation
Returns
Type Description
Mutation.Builder

parseDelimitedFrom(InputStream input)

publicstaticMutationparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticMutationparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticMutationparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticMutationparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticMutationparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticMutationparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticMutationparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticMutationparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticMutationparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticMutationparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticMutationparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticMutationparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<Mutation>parser()
Returns
Type Description
Parser<Mutation>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBaseVersion()

publiclonggetBaseVersion()

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

publicMutation.ConflictDetectionStrategyCasegetConflictDetectionStrategyCase()
Returns
Type Description
Mutation.ConflictDetectionStrategyCase

getDefaultInstanceForType()

publicMutationgetDefaultInstanceForType()
Returns
Type Description
Mutation

getDelete()

publicKeygetDelete()

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

publicKeyOrBuildergetDeleteOrBuilder()

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

publicEntitygetInsert()

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

publicEntityOrBuildergetInsertOrBuilder()

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

publicMutation.OperationCasegetOperationCase()
Returns
Type Description
Mutation.OperationCase

getParserForType()

publicParser<Mutation>getParserForType()
Returns
Type Description
Parser<Mutation>
Overrides

getPropertyMask()

publicPropertyMaskgetPropertyMask()

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

publicPropertyMaskOrBuildergetPropertyMaskOrBuilder()

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

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getUpdate()

publicEntitygetUpdate()

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

publicEntityOrBuildergetUpdateOrBuilder()

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

publicTimestampgetUpdateTime()

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

publicTimestampOrBuildergetUpdateTimeOrBuilder()

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

publicEntitygetUpsert()

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

publicEntityOrBuildergetUpsertOrBuilder()

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

publicbooleanhasBaseVersion()

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

publicbooleanhasDelete()

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

publicbooleanhasInsert()

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

publicbooleanhasPropertyMask()

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

publicbooleanhasUpdate()

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

publicbooleanhasUpdateTime()

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

publicbooleanhasUpsert()

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

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicMutation.BuildernewBuilderForType()
Returns
Type Description
Mutation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedMutation.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Mutation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicMutation.BuildertoBuilder()
Returns
Type Description
Mutation.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.