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.
inline fun <T> DocumentSnapshot.toObject(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): T?(source)
The document as T (see toObject), with the server timestamps resolved as serverTimestampBehavior says.
The document as T (see DocumentSnapshot.toObject); a query document always exists.
inline fun <T> QueryDocumentSnapshot.toObject(serverTimestampBehavior: DocumentSnapshot.ServerTimestampBehavior): T(source)
The document as T (see DocumentSnapshot.toObject), with the server timestamps resolved as serverTimestampBehavior says.