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.
↳ conflict_resolution_strategy
int
The strategy to use when a conflict is detected. Defaults toSERVER_VALUE. If this is set, thenconflict_detection_strategymust also be set.
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 fordelete. 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.
Optional. The transforms to perform on the entity. This field can be set only when the operation isinsert,update, orupsert. If present, the transforms are be applied to the entity regardless of the property mask, in order, after the operation.
getInsert
The entity to insert. The entity must not already exist.
The entity key's final path element may be incomplete.
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.
Returns
Type
Description
int|string
hasBaseVersion
setBaseVersion
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.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
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.
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.
The strategy to use when a conflict is detected. Defaults toSERVER_VALUE.
If this is set, thenconflict_detection_strategymust also be set.
Returns
Type
Description
int
setConflictResolutionStrategy
The strategy to use when a conflict is detected. Defaults toSERVER_VALUE.
If this is set, thenconflict_detection_strategymust also be set.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
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 fordelete.
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.
None of the properties in the mask may have a reserved name, except for__key__.
This field is ignored fordelete.
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.
Optional. The transforms to perform on the entity.
This field can be set only when the operation isinsert,update,
orupsert. If present, the transforms are be applied to the entity
regardless of the property mask, in order, after the operation.
Optional. The transforms to perform on the entity.
This field can be set only when the operation isinsert,update,
orupsert. If present, the transforms are be applied to the entity
regardless of the property mask, in order, after the operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Datastore V1 Client - Class Mutation (1.33.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.33.1 (latest)](/php/docs/reference/cloud-datastore/latest/V1.Mutation)\n- [1.33.0](/php/docs/reference/cloud-datastore/1.33.0/V1.Mutation)\n- [1.32.3](/php/docs/reference/cloud-datastore/1.32.3/V1.Mutation)\n- [1.31.0](/php/docs/reference/cloud-datastore/1.31.0/V1.Mutation)\n- [1.30.0](/php/docs/reference/cloud-datastore/1.30.0/V1.Mutation)\n- [1.29.2](/php/docs/reference/cloud-datastore/1.29.2/V1.Mutation)\n- [1.28.2](/php/docs/reference/cloud-datastore/1.28.2/V1.Mutation)\n- [1.26.0](/php/docs/reference/cloud-datastore/1.26.0/V1.Mutation)\n- [1.25.0](/php/docs/reference/cloud-datastore/1.25.0/V1.Mutation)\n- [1.24.4](/php/docs/reference/cloud-datastore/1.24.4/V1.Mutation)\n- [1.23.0](/php/docs/reference/cloud-datastore/1.23.0/V1.Mutation)\n- [1.22.1](/php/docs/reference/cloud-datastore/1.22.1/V1.Mutation)\n- [1.21.2](/php/docs/reference/cloud-datastore/1.21.2/V1.Mutation)\n- [1.19.0](/php/docs/reference/cloud-datastore/1.19.0/V1.Mutation)\n- [1.18.1](/php/docs/reference/cloud-datastore/1.18.1/V1.Mutation)\n- [1.17.1](/php/docs/reference/cloud-datastore/1.17.1/V1.Mutation) \nReference documentation and code samples for the Cloud Datastore V1 Client class Mutation.\n\nA mutation to apply to an entity.\n\nGenerated from protobuf message `google.datastore.v1.Mutation`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Datastore \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getInsert\n\nThe entity to insert. The entity must not already exist.\n\nThe entity key's final path element may be incomplete.\n\n### hasInsert\n\n### setInsert\n\nThe entity to insert. The entity must not already exist.\n\nThe entity key's final path element may be incomplete.\n\n### getUpdate\n\nThe entity to update. The entity must already exist.\n\nMust have a complete key path.\n\n### hasUpdate\n\n### setUpdate\n\nThe entity to update. The entity must already exist.\n\nMust have a complete key path.\n\n### getUpsert\n\nThe entity to upsert. The entity may or may not already exist.\n\nThe entity key's final path element may be incomplete.\n\n### hasUpsert\n\n### setUpsert\n\nThe entity to upsert. The entity may or may not already exist.\n\nThe entity key's final path element may be incomplete.\n\n### getDelete\n\nThe key of the entity to delete. The entity may or may not already exist.\n\nMust have a complete key path and must not be reserved/read-only.\n\n### hasDelete\n\n### setDelete\n\nThe key of the entity to delete. The entity may or may not already exist.\n\nMust have a complete key path and must not be reserved/read-only.\n\n### getBaseVersion\n\nThe version of the entity that this mutation is being applied\nto. If this does not match the current version on the server, the\nmutation conflicts.\n\n### hasBaseVersion\n\n### setBaseVersion\n\nThe version of the entity that this mutation is being applied\nto. If this does not match the current version on the server, the\nmutation conflicts.\n\n### getUpdateTime\n\nThe update time of the entity that this mutation is being applied\nto. If this does not match the current update time on the server, the\nmutation conflicts.\n\n### hasUpdateTime\n\n### setUpdateTime\n\nThe update time of the entity that this mutation is being applied\nto. If this does not match the current update time on the server, the\nmutation conflicts.\n\n### getConflictResolutionStrategy\n\nThe strategy to use when a conflict is detected. Defaults to\n`SERVER_VALUE`.\n\nIf this is set, then `conflict_detection_strategy` must also be set.\n\n### setConflictResolutionStrategy\n\nThe strategy to use when a conflict is detected. Defaults to\n`SERVER_VALUE`.\n\nIf this is set, then `conflict_detection_strategy` must also be set.\n\n### getPropertyMask\n\nThe properties to write in this mutation.\n\nNone of the properties in the mask may have a reserved name, except for\n`__key__`.\nThis field is ignored for `delete`.\nIf the entity already exists, only properties referenced in the mask are\nupdated, others are left untouched.\nProperties referenced in the mask but not in the entity are deleted.\n\n### hasPropertyMask\n\n### clearPropertyMask\n\n### setPropertyMask\n\nThe properties to write in this mutation.\n\nNone of the properties in the mask may have a reserved name, except for\n`__key__`.\nThis field is ignored for `delete`.\nIf the entity already exists, only properties referenced in the mask are\nupdated, others are left untouched.\nProperties referenced in the mask but not in the entity are deleted.\n\n### getPropertyTransforms\n\nOptional. The transforms to perform on the entity.\n\nThis field can be set only when the operation is `insert`, `update`,\nor `upsert`. If present, the transforms are be applied to the entity\nregardless of the property mask, in order, after the operation.\n\n### setPropertyTransforms\n\nOptional. The transforms to perform on the entity.\n\nThis field can be set only when the operation is `insert`, `update`,\nor `upsert`. If present, the transforms are be applied to the entity\nregardless of the property mask, in order, after the operation.\n\n### getOperation\n\n### getConflictDetectionStrategy"]]