Firestore API - Class Precondition (3.4.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
TypeDescription
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
TypeDescription
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