Class Precondition (2.5.0)

public sealed 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
TypeDescription
Nullable<Boolean>

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
TypeDescription
Nullable<Timestamp>

MustExist

public static Precondition MustExist { get; }

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

Property Value
TypeDescription
Precondition

None

public static Precondition None { get; }

No precondition.

Property Value
TypeDescription
Precondition

Methods

LastUpdated(Timestamp)

public static Precondition LastUpdated(Timestamp timestamp)

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

Parameter
NameDescription
timestampTimestamp
Returns
TypeDescription
Precondition