The automatically allocated key. Set only when the mutation allocated a key.
↳ version
int|string
The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity.
The update time of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the timestamp will be the update timestamp of the current entity. This field will not be set after a 'delete'.
↳ conflict_detected
bool
Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.
The version of the entity on the server after processing the mutation. If
the mutation doesn't change anything on the server, then the version will
be the version of the current entity or, if no entity is present, a version
that is strictly greater than the version of any previous entity and less
than the version of any possible future entity.
Returns
Type
Description
int|string
setVersion
The version of the entity on the server after processing the mutation. If
the mutation doesn't change anything on the server, then the version will
be the version of the current entity or, if no entity is present, a version
that is strictly greater than the version of any previous entity and less
than the version of any possible future entity.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getCreateTime
The create time of the entity. This field will not be set after a 'delete'.
The update time of the entity on the server after processing the mutation.
If the mutation doesn't change anything on the server, then the timestamp
will be the update timestamp of the current entity. This field will not be
set after a 'delete'.
The update time of the entity on the server after processing the mutation.
If the mutation doesn't change anything on the server, then the timestamp
will be the update timestamp of the current entity. This field will not be
set after a 'delete'.
[[["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 MutationResult (1.33.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.33.1 (latest)](/php/docs/reference/cloud-datastore/latest/V1.MutationResult)\n- [1.33.0](/php/docs/reference/cloud-datastore/1.33.0/V1.MutationResult)\n- [1.32.3](/php/docs/reference/cloud-datastore/1.32.3/V1.MutationResult)\n- [1.31.0](/php/docs/reference/cloud-datastore/1.31.0/V1.MutationResult)\n- [1.30.0](/php/docs/reference/cloud-datastore/1.30.0/V1.MutationResult)\n- [1.29.2](/php/docs/reference/cloud-datastore/1.29.2/V1.MutationResult)\n- [1.28.2](/php/docs/reference/cloud-datastore/1.28.2/V1.MutationResult)\n- [1.26.0](/php/docs/reference/cloud-datastore/1.26.0/V1.MutationResult)\n- [1.25.0](/php/docs/reference/cloud-datastore/1.25.0/V1.MutationResult)\n- [1.24.4](/php/docs/reference/cloud-datastore/1.24.4/V1.MutationResult)\n- [1.23.0](/php/docs/reference/cloud-datastore/1.23.0/V1.MutationResult)\n- [1.22.1](/php/docs/reference/cloud-datastore/1.22.1/V1.MutationResult)\n- [1.21.2](/php/docs/reference/cloud-datastore/1.21.2/V1.MutationResult)\n- [1.19.0](/php/docs/reference/cloud-datastore/1.19.0/V1.MutationResult)\n- [1.18.1](/php/docs/reference/cloud-datastore/1.18.1/V1.MutationResult)\n- [1.17.1](/php/docs/reference/cloud-datastore/1.17.1/V1.MutationResult) \nReference documentation and code samples for the Cloud Datastore V1 Client class MutationResult.\n\nThe result of applying a mutation.\n\nGenerated from protobuf message `google.datastore.v1.MutationResult`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Datastore \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getKey\n\nThe automatically allocated key.\n\nSet only when the mutation allocated a key.\n\n### hasKey\n\n### clearKey\n\n### setKey\n\nThe automatically allocated key.\n\nSet only when the mutation allocated a key.\n\n### getVersion\n\nThe version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.\n\n### setVersion\n\nThe version of the entity on the server after processing the mutation. If\nthe mutation doesn't change anything on the server, then the version will\nbe the version of the current entity or, if no entity is present, a version\nthat is strictly greater than the version of any previous entity and less\nthan the version of any possible future entity.\n\n### getCreateTime\n\nThe create time of the entity. This field will not be set after a 'delete'.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nThe create time of the entity. This field will not be set after a 'delete'.\n\n### getUpdateTime\n\nThe update time of the entity on the server after processing the mutation.\n\nIf the mutation doesn't change anything on the server, then the timestamp\nwill be the update timestamp of the current entity. This field will not be\nset after a 'delete'.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nThe update time of the entity on the server after processing the mutation.\n\nIf the mutation doesn't change anything on the server, then the timestamp\nwill be the update timestamp of the current entity. This field will not be\nset after a 'delete'.\n\n### getConflictDetected\n\nWhether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.\n\n### setConflictDetected\n\nWhether a conflict was detected for this mutation. Always false when a\nconflict detection strategy field is not set in the mutation.\n\n### getTransformResults\n\nThe results of applying each\n[PropertyTransform](/php/docs/reference/cloud-datastore/latest/V1.PropertyTransform), in the same\norder of the request.\n\n### setTransformResults\n\nThe results of applying each\n[PropertyTransform](/php/docs/reference/cloud-datastore/latest/V1.PropertyTransform), in the same\norder of the request."]]