public sealed class DocumentMask : IMessage<DocumentMask>, IEquatable<DocumentMask>, IDeepCloneable<DocumentMask>, IBufferMessage, IMessage
Reference documentation and code samples for the Firestore v1 API class DocumentMask.
A set of field paths on a document.
Used to restrict a get or update operation on a document to a subset of its
fields.
This is different from standard field masks, as this is always scoped to a
[Document][google.firestore.v1.Document], and takes in account the dynamic
nature of [Value][google.firestore.v1.Value].
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDocumentMask\u003c/code\u003e class in the Firestore v1 API is used to specify a subset of fields in a document for get or update operations.\u003c/p\u003e\n"],["\u003cp\u003eThis class 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.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDocumentMask\u003c/code\u003e is distinct from standard field masks because it is specifically tailored to \u003ccode\u003eDocument\u003c/code\u003e objects and the dynamic nature of \u003ccode\u003eValue\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available for \u003ccode\u003eDocumentMask\u003c/code\u003e is 3.10.0, with several previous versions listed, down to version 2.3.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDocumentMask\u003c/code\u003e has a \u003ccode\u003eFieldPaths\u003c/code\u003e property, which is a list of strings that specifies which fields are included in the mask, referencing the \u003ccode\u003eDocument.fields\u003c/code\u003e syntax for path specification.\u003c/p\u003e\n"]]],[],null,["# Firestore v1 API - Class DocumentMask (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.DocumentMask)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.9.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.8.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.7.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.6.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.5.1/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.4.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.3.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.2.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.1.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.0.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.5.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.4.0/Google.Cloud.Firestore.V1.DocumentMask)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.3.0/Google.Cloud.Firestore.V1.DocumentMask) \n\n public sealed class DocumentMask : IMessage\u003cDocumentMask\u003e, IEquatable\u003cDocumentMask\u003e, IDeepCloneable\u003cDocumentMask\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Firestore v1 API class DocumentMask.\n\nA set of field paths on a document.\nUsed to restrict a get or update operation on a document to a subset of its\nfields.\nThis is different from standard field masks, as this is always scoped to a\n\\[Document\\]\\[google.firestore.v1.Document\\], and takes in account the dynamic\nnature of \\[Value\\]\\[google.firestore.v1.Value\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DocumentMask \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DocumentMask](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.DocumentMask), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DocumentMask](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.DocumentMask), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DocumentMask](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.DocumentMask), [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### DocumentMask()\n\n public DocumentMask()\n\n### DocumentMask(DocumentMask)\n\n public DocumentMask(DocumentMask other)\n\nProperties\n----------\n\n### FieldPaths\n\n public RepeatedField\u003cstring\u003e FieldPaths { get; }\n\nThe list of field paths in the mask. See\n\\[Document.fields\\]\\[google.firestore.v1.Document.fields\\] for a field path\nsyntax reference."]]