Interface: Resource

Properties

__name__

non-null rules.Path

The full document name, as a path.

Example

// Check 'name' field from the document
resource['__name__'] == /databases/(default)/documents/collection/document

data

non-null rules.Map

Map of the document data.

Example

// Check 'name' field from the document
resource.data.name == 'John Doe'

id

non-null rules.String

String of the document's key

Example

resource['__name__'] ==
  /databases/(default)/documents/collection/$(resource.id)