DocumentSnapshot
The data of a document read from Firestore, mirroring com.google.firebase.firestore.DocumentSnapshot from the Firebase Android SDK. Field values are the Firestore types: Boolean, Long, Double, String, Timestamp, GeoPoint, Blob, DocumentReference, List and Map, as on Android; a document that does not exist has no data.
A custom class is read with the reified toObject<T>() and getField<T>() extensions, which map a @Serializable class with the Android SDK's rules on every platform; the SDK's reflective toObject(Class) and get(field, Class) are deprecated with an error on Android. The java.util.Date accessors are declared through the error-deprecated stand-in, as Timestamp.toDate() is, so common code is pointed at getTimestamp.
Inheritors
Types
Properties
Functions
The JS SDK creates a new object per read, so snapshots are equal when they are of the same document and data.
The value of fieldPath, or null.
The value of field (a .-separated path), or null.
The value of fieldPath with server timestamps resolved per serverTimestampBehavior.
The value of field with server timestamps resolved per serverTimestampBehavior.
The fields as a map with server timestamps resolved per serverTimestampBehavior, or null when the document does not exist.
Android/JVM only: the value of field as a java.util.Date; common code uses getTimestamp and toKotlinInstant().
Android/JVM only (see getDate).
The SDK's reified getField; deprecated towards com.google.firebase.serialization.getField.
The value of field as T, as the Android SDK's reified getField, through the serializer of T with the Android SDK's rules (FirebaseFormat.Firestore, see firestoreFormat) on every platform; Any stands for the value as it is. It takes the place of the SDK's reflective get(String, Class) and of the SDK's own reified getField<T>() (com.google.firebase.firestore.getField), which is deprecated with an error.
The SDK's reified toObject; deprecated towards com.google.firebase.serialization.toObject.
The document as T, as the Android SDK's reified toObject, through the serializer of T with the Android SDK's rules (FirebaseFormat.Firestore, see firestoreFormat) on every platform, @DocumentId and @ServerTimestamp included; null when the document does not exist. It takes the place of the SDK's reflective toObject(Class) and of the SDK's own reified toObject<T>() (com.google.firebase.firestore.toObject), which is deprecated with an error.
The document as T (see toObject), with the server timestamps resolved as serverTimestampBehavior says.