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.
public RepeatedField<PropertyTransform> PropertyTransforms { get; }
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.
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.
[[["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-08-07 UTC."],[[["\u003cp\u003eThis webpage provides reference documentation for the \u003ccode\u003eMutation\u003c/code\u003e class within the Google Cloud Datastore v1 API, detailing its functionality and usage in .NET.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutation\u003c/code\u003e class is used to define a modification applied to an entity within the Datastore, supporting operations like insert, update, upsert, and delete.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation outlines the different versions of the API available, with the latest being version 4.15.0, and shows a history of versions available all the way down to 3.2.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMutation\u003c/code\u003e implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and has properties to handle conflict resolution and manage entity versions.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation includes detailed information about the properties and constructors of the \u003ccode\u003eMutation\u003c/code\u003e class, such as \u003ccode\u003eBaseVersion\u003c/code\u003e, \u003ccode\u003eDelete\u003c/code\u003e, \u003ccode\u003eInsert\u003c/code\u003e, and \u003ccode\u003eUpdate\u003c/code\u003e, providing clarity on how to use these features.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Datastore v1 API - Class Mutation (4.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.Mutation)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.14.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.13.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.12.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.11.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.10.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.9.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.8.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.7.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.6.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.5.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.4.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.3.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.2.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.1.0/Google.Cloud.Datastore.V1.Mutation)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.0.0/Google.Cloud.Datastore.V1.Mutation)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.5.0/Google.Cloud.Datastore.V1.Mutation)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.4.0/Google.Cloud.Datastore.V1.Mutation)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.3.0/Google.Cloud.Datastore.V1.Mutation)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.2.0/Google.Cloud.Datastore.V1.Mutation) \n\n public sealed class Mutation : IMessage\u003cMutation\u003e, IEquatable\u003cMutation\u003e, IDeepCloneable\u003cMutation\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Datastore v1 API class Mutation.\n\nA mutation to apply to an entity. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Mutation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Mutation](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.Mutation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Mutation](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.Mutation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Mutation](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.Mutation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Datastore.V1](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Datastore.V1.dll\n\nConstructors\n------------\n\n### Mutation()\n\n public Mutation()\n\n### Mutation(Mutation)\n\n public Mutation(Mutation other)\n\nProperties\n----------\n\n### BaseVersion\n\n public long BaseVersion { get; set; }\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### ConflictDetectionStrategyCase\n\n public Mutation.ConflictDetectionStrategyOneofCase ConflictDetectionStrategyCase { get; }\n\n### ConflictResolutionStrategy\n\n public Mutation.Types.ConflictResolutionStrategy ConflictResolutionStrategy { get; set; }\n\nThe strategy to use when a conflict is detected. Defaults to\n`SERVER_VALUE`.\nIf this is set, then `conflict_detection_strategy` must also be set.\n\n### Delete\n\n public Key Delete { get; set; }\n\nThe key of the entity to delete. The entity may or may not already exist.\nMust have a complete key path and must not be reserved/read-only.\n\n### HasBaseVersion\n\n public bool HasBaseVersion { get; }\n\nGets whether the \"base_version\" field is set\n\n### Insert\n\n public Entity Insert { get; set; }\n\nThe entity to insert. The entity must not already exist.\nThe entity key's final path element may be incomplete.\n\n### OperationCase\n\n public Mutation.OperationOneofCase OperationCase { get; }\n\n### PropertyMask\n\n public PropertyMask PropertyMask { get; set; }\n\nThe properties to write in this mutation.\nNone of the properties in the mask may have a reserved name, except for\n`__key__`.\nThis field is ignored for `delete`.\n\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### PropertyTransforms\n\n public RepeatedField\u003cPropertyTransform\u003e PropertyTransforms { get; }\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### Update\n\n public Entity Update { get; set; }\n\nThe entity to update. The entity must already exist.\nMust have a complete key path.\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\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### Upsert\n\n public Entity Upsert { get; set; }\n\nThe entity to upsert. The entity may or may not already exist.\nThe entity key's final path element may be incomplete."]]