[[["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 latest version of the \u003ccode\u003ePrecondition\u003c/code\u003e class in the Firestore API is 3.10.0, with a history of previous versions available for review.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePrecondition\u003c/code\u003e class is immutable and is used to represent conditions for update operations within Firestore.\u003c/p\u003e\n"],["\u003cp\u003eThis class contains properties such as \u003ccode\u003eExists\u003c/code\u003e, indicating whether a document must or must not exist, and \u003ccode\u003eLastUpdateTime\u003c/code\u003e, representing the document's last update timestamp.\u003c/p\u003e\n"],["\u003cp\u003eThe class also provides static properties \u003ccode\u003eMustExist\u003c/code\u003e and \u003ccode\u003eNone\u003c/code\u003e to specify that a document must exist or that no precondition is required, respectively.\u003c/p\u003e\n"],["\u003cp\u003eA static \u003ccode\u003eLastUpdated\u003c/code\u003e method is available for creating a precondition based on a specified timestamp of when a document was last updated.\u003c/p\u003e\n"]]],[],null,["# Firestore API - Class Precondition (3.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.10.0 (latest)](/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore.Precondition)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.9.0/Google.Cloud.Firestore.Precondition)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.8.0/Google.Cloud.Firestore.Precondition)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.7.0/Google.Cloud.Firestore.Precondition)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.6.0/Google.Cloud.Firestore.Precondition)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.Firestore/3.5.1/Google.Cloud.Firestore.Precondition)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.4.0/Google.Cloud.Firestore.Precondition)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.3.0/Google.Cloud.Firestore.Precondition)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.2.0/Google.Cloud.Firestore.Precondition)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.1.0/Google.Cloud.Firestore.Precondition)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.0.0/Google.Cloud.Firestore.Precondition)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Firestore/2.5.0/Google.Cloud.Firestore.Precondition)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore/2.4.0/Google.Cloud.Firestore.Precondition)\n- [2.3.1](/dotnet/docs/reference/Google.Cloud.Firestore/2.3.1/Google.Cloud.Firestore.Precondition) \n\n public sealed class Precondition\n\nReference documentation and code samples for the Firestore API class Precondition.\n\nImmutable class representing a precondition for an update operation. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Precondition \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](/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore)\n\nAssembly\n--------\n\nGoogle.Cloud.Firestore.dll\n\nProperties\n----------\n\n### Exists\n\n public bool? Exists { get; }\n\nTrue if the document must exist; false if the document must not exist.\nIf this is non-null, [LastUpdateTime](/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore.Precondition#Google_Cloud_Firestore_Precondition_LastUpdateTime) will be null.\n\n### LastUpdateTime\n\n public Timestamp? LastUpdateTime { get; }\n\nCondition that the document was last updated at the specified timestamp, if specified.\nIf this is non-null, [Exists](/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore.Precondition#Google_Cloud_Firestore_Precondition_Exists) will be null.\n\n### MustExist\n\n public static Precondition MustExist { get; }\n\nPrecondition that the document must exist, but with any last update time.\n\n### None\n\n public static Precondition None { get; }\n\nNo precondition.\n\nMethods\n-------\n\n### LastUpdated(Timestamp)\n\n public static Precondition LastUpdated(Timestamp timestamp)\n\nCreates a precondition that the document has the specified last update time."]]