Firestore API - Class Precondition (3.9.0)

public sealed class Precondition

Reference documentation and code samples for the Firestore API class Precondition.

Immutable class representing a precondition for an update operation.

Inheritance

object > Precondition

Namespace

Google.Cloud.Firestore

Assembly

Google.Cloud.Firestore.dll

Properties

Exists

public bool? Exists { get; }

True if the document must exist; false if the document must not exist. If this is non-null, LastUpdateTime will be null.

Property Value
Type Description
bool

LastUpdateTime

public Timestamp? LastUpdateTime { get; }

Condition that the document was last updated at the specified timestamp, if specified. If this is non-null, Exists will be null.

Property Value
Type Description
Timestamp

MustExist

public static Precondition MustExist { get; }

Precondition that the document must exist, but with any last update time.

Property Value
Type Description
Precondition

None

public static Precondition None { get; }

No precondition.

Property Value
Type Description
Precondition

Methods

LastUpdated(Timestamp)

public static Precondition LastUpdated(Timestamp timestamp)

Creates a precondition that the document has the specified last update time.

Parameter
Name Description
timestamp Timestamp
Returns
Type Description
Precondition