public sealed class DocumentChange : IMessage<DocumentChange>, IEquatable<DocumentChange>, IDeepCloneable<DocumentChange>, IBufferMessage, IMessage
Reference documentation and code samples for the Firestore v1 API class DocumentChange.
A [Document][google.firestore.v1.Document] has changed.
May be the result of multiple [writes][google.firestore.v1.Write], including
deletes, that ultimately resulted in a new value for the
[Document][google.firestore.v1.Document].
Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be
returned for the same logical change, if multiple targets are affected.
[[["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-28 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eDocumentChange\u003c/code\u003e class within the Google Cloud Firestore v1 API, covering its various versions, with the latest being 3.10.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDocumentChange\u003c/code\u003e class represents a change to a Firestore \u003ccode\u003eDocument\u003c/code\u003e, potentially resulting from multiple writes or deletes, and it can affect multiple targets.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements multiple interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, which means it is designed for efficient message handling and deep cloning.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDocumentChange\u003c/code\u003e has properties such as \u003ccode\u003eDocument\u003c/code\u003e, \u003ccode\u003eRemovedTargetIds\u003c/code\u003e, and \u003ccode\u003eTargetIds\u003c/code\u003e, which hold information about the new document state, targets that no longer match the document, and targets that match the document, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDocumentChange\u003c/code\u003e class has two constructors, one default constructor that takes no parameters and one that takes another \u003ccode\u003eDocumentChange\u003c/code\u003e as a parameter.\u003c/p\u003e\n"]]],[],null,["# Firestore v1 API - Class DocumentChange (3.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.10.0 (latest)](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.9.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.8.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.7.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.6.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.5.1/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.4.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.3.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.2.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.1.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.0.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.5.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.4.0/Google.Cloud.Firestore.V1.DocumentChange)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.3.0/Google.Cloud.Firestore.V1.DocumentChange) \n\n public sealed class DocumentChange : IMessage\u003cDocumentChange\u003e, IEquatable\u003cDocumentChange\u003e, IDeepCloneable\u003cDocumentChange\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Firestore v1 API class DocumentChange.\n\nA \\[Document\\]\\[google.firestore.v1.Document\\] has changed.\n\nMay be the result of multiple \\[writes\\]\\[google.firestore.v1.Write\\], including\ndeletes, that ultimately resulted in a new value for the\n\\[Document\\]\\[google.firestore.v1.Document\\].\n\nMultiple \\[DocumentChange\\]\\[google.firestore.v1.DocumentChange\\] messages may be\nreturned for the same logical change, if multiple targets are affected. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DocumentChange \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DocumentChange](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.DocumentChange), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DocumentChange](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.DocumentChange), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DocumentChange](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.DocumentChange), [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.Firestore.V1](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Firestore.V1.dll\n\nConstructors\n------------\n\n### DocumentChange()\n\n public DocumentChange()\n\n### DocumentChange(DocumentChange)\n\n public DocumentChange(DocumentChange other)\n\nProperties\n----------\n\n### Document\n\n public Document Document { get; set; }\n\nThe new state of the \\[Document\\]\\[google.firestore.v1.Document\\].\n\nIf `mask` is set, contains only fields that were updated or added.\n\n### RemovedTargetIds\n\n public RepeatedField\u003cint\u003e RemovedTargetIds { get; }\n\nA set of target IDs for targets that no longer match this document.\n\n### TargetIds\n\n public RepeatedField\u003cint\u003e TargetIds { get; }\n\nA set of target IDs of targets that match this document."]]