# Path: google/cloud/firestore_v1/types/document.py
# class Document(proto.Message):
# class Value(proto.Message):
# class ArrayValue(proto.Message):
# class MapValue(proto.Message):
# 
# Path: google/cloud/firestore_v1/types/firestore.py
# class GetDocumentRequest(proto.Message):
# class ListDocumentsRequest(proto.Message):
# class ListDocumentsResponse(proto.Message):
# class CreateDocumentRequest(proto.Message):
# class UpdateDocumentRequest(proto.Message):
# class DeleteDocumentRequest(proto.Message):
# class BatchGetDocumentsRequest(proto.Message):
# class BatchGetDocumentsResponse(proto.Message):
# class BeginTransactionRequest(proto.Message):
# class BeginTransactionResponse(proto.Message):
# class CommitRequest(proto.Message):
# class CommitResponse(proto.Message):
# class RollbackRequest(proto.Message):
# class RunQueryRequest(proto.Message):
# class RunQueryResponse(proto.Message):
# class PartitionQueryRequest(proto.Message):
# class PartitionQueryResponse(proto.Message):
# class WriteRequest(proto.Message):
# class WriteResponse(proto.Message):
# class ListenRequest(proto.Message):
# class ListenResponse(proto.Message):
# class Target(proto.Message):
#     class DocumentsTarget(proto.Message):
#     class QueryTarget(proto.Message):
# class TargetChange(proto.Message):
#     class TargetChangeType(proto.Enum):
# class ListCollectionIdsRequest(proto.Message):
# class ListCollectionIdsResponse(proto.Message):
# class BatchWriteRequest(proto.Message):
# class BatchWriteResponse(proto.Message):
#     def raw_page(self):
#     def raw_page(self):
#     def raw_page(self):
#         NO_CHANGE = 0
#         ADD = 1
#         REMOVE = 2
#         CURRENT = 3
#         RESET = 4
# 
# Path: google/cloud/firestore_v1/types/write.py
# class Write(proto.Message):
# class DocumentTransform(proto.Message):
#     class FieldTransform(proto.Message):
#         class ServerValue(proto.Enum):
# class WriteResult(proto.Message):
# class DocumentChange(proto.Message):
# class DocumentDelete(proto.Message):
# class DocumentRemove(proto.Message):
# class ExistenceFilter(proto.Message):
#             SERVER_VALUE_UNSPECIFIED = 0
#             REQUEST_TIME = 1
# 
# Path: tests/unit/v1/conformance_tests.py
# class TestFile(proto.Message):
# class Test(proto.Message):
# class GetTest(proto.Message):
# class CreateTest(proto.Message):
# class SetTest(proto.Message):
# class UpdateTest(proto.Message):
# class UpdatePathsTest(proto.Message):
# class DeleteTest(proto.Message):
# class SetOption(proto.Message):
# class QueryTest(proto.Message):
# class Clause(proto.Message):
# class Select(proto.Message):
# class Where(proto.Message):
# class OrderBy(proto.Message):
# class Cursor_(proto.Message):
# class DocSnapshot(proto.Message):
# class FieldPath(proto.Message):
# class ListenTest(proto.Message):
# class Snapshot(proto.Message):
# class DocChange(proto.Message):
#     class Kind(proto.Enum):
#         KIND_UNSPECIFIED = 0
#         ADDED = 1
#         REMOVED = 2
#         MODIFIED = 3


import functools
import glob
import json
import os
import mock
import pytest
    import google.auth.credentials
    import google.auth.credentials
from google.cloud.firestore_v1.types import document
from google.cloud.firestore_v1.types import firestore
from google.cloud.firestore_v1.types import write
from google.protobuf.timestamp_pb2 import Timestamp
from tests.unit.v1 import conformance_tests
    from google.cloud.firestore_v1 import Client
    from google.cloud.firestore_v1.client import DEFAULT_DATABASE
    from google.cloud.firestore_v1 import Client
    from google.cloud.firestore_v1 import DocumentSnapshot
    from google.cloud.firestore_v1 import Watch
    from google.cloud.firestore_v1 import ArrayRemove
    from google.cloud.firestore_v1 import ArrayUnion
    from google.cloud.firestore_v1 import DELETE_FIELD
    from google.cloud.firestore_v1 import SERVER_TIMESTAMP
    from google.cloud.firestore_v1 import _helpers
    from google.cloud.firestore_v1 import Client
        from google.cloud.firestore_v1.types import query
    from google.auth.credentials import Credentials
    from google.cloud.firestore_v1 import Client
    from google.cloud.firestore_v1 import Query
    from google.cloud.firestore_v1 import DocumentReference
    from google.cloud.firestore_v1 import DocumentSnapshot
    def __init__(self, rpc, on_snapshot):
        self._rpc = rpc
        self.on_snapshot = on_snapshot

    def start(self):
        self.started = True

    def stop(self):
        self.stopped = True
        self.is_active = False


class DummyCollection(object):
    def __init__(self, client, parent=None):
        self._client = client
        self._parent = parent

    def _parent_info(self):
        return "{}/documents".format(self._client._database_string), None


class DummyQuery(object):  # pragma: NO COVER
    def __init__(self, parent):
        self._parent = parent
        self._comparator = lambda x, y: 1

    @property
    def _client(self):
        return self._parent._client


# Path: google/cloud/firestore_v1/types/document.py
# class Document(proto.Message):
# class Value(proto.Message):
# class ArrayValue(proto.Message):
# class MapValue(proto.Message):
# 
# Path: google/cloud/firestore_v1/types/firestore.py
# class GetDocumentRequest(proto.Message):
# class ListDocumentsRequest(proto.Message):
# class ListDocumentsResponse(proto.Message):
# class CreateDocumentRequest(proto.Message):
# class UpdateDocumentRequest(proto.Message):
# class DeleteDocumentRequest(proto.Message):
# class BatchGetDocumentsRequest(proto.Message):
# class BatchGetDocumentsResponse(proto.Message):
# class BeginTransactionRequest(proto.Message):
# class BeginTransactionResponse(proto.Message):
# class CommitRequest(proto.Message):
# class CommitResponse(proto.Message):
# class RollbackRequest(proto.Message):
# class RunQueryRequest(proto.Message):
# class RunQueryResponse(proto.Message):
# class PartitionQueryRequest(proto.Message):
# class PartitionQueryResponse(proto.Message):
# class WriteRequest(proto.Message):
# class WriteResponse(proto.Message):
# class ListenRequest(proto.Message):
# class ListenResponse(proto.Message):
# class Target(proto.Message):
#     class DocumentsTarget(proto.Message):
#     class QueryTarget(proto.Message):
# class TargetChange(proto.Message):
#     class TargetChangeType(proto.Enum):
# class ListCollectionIdsRequest(proto.Message):
# class ListCollectionIdsResponse(proto.Message):
# class BatchWriteRequest(proto.Message):
# class BatchWriteResponse(proto.Message):
#     def raw_page(self):
#     def raw_page(self):
#     def raw_page(self):
#         NO_CHANGE = 0
#         ADD = 1
#         REMOVE = 2
#         CURRENT = 3
#         RESET = 4
# 
# Path: google/cloud/firestore_v1/types/write.py
# class Write(proto.Message):
# class DocumentTransform(proto.Message):
#     class FieldTransform(proto.Message):
#         class ServerValue(proto.Enum):
# class WriteResult(proto.Message):
# class DocumentChange(proto.Message):
# class DocumentDelete(proto.Message):
# class DocumentRemove(proto.Message):
# class ExistenceFilter(proto.Message):
#             SERVER_VALUE_UNSPECIFIED = 0
#             REQUEST_TIME = 1
# 
# Path: tests/unit/v1/conformance_tests.py
# class TestFile(proto.Message):
# class Test(proto.Message):
# class GetTest(proto.Message):
# class CreateTest(proto.Message):
# class SetTest(proto.Message):
# class UpdateTest(proto.Message):
# class UpdatePathsTest(proto.Message):
# class DeleteTest(proto.Message):
# class SetOption(proto.Message):
# class QueryTest(proto.Message):
# class Clause(proto.Message):
# class Select(proto.Message):
# class Where(proto.Message):
# class OrderBy(proto.Message):
# class Cursor_(proto.Message):
# class DocSnapshot(proto.Message):
# class FieldPath(proto.Message):
# class ListenTest(proto.Message):
# class Snapshot(proto.Message):
# class DocChange(proto.Message):
#     class Kind(proto.Enum):
#         KIND_UNSPECIFIED = 0
#         ADDED = 1
#         REMOVED = 2
#         MODIFIED = 3


# Path: tests/unit/v1/test_cross_language.py
import functools
import glob
import json
import os
import mock
import pytest
    import google.auth.credentials
    import google.auth.credentials
from google.cloud.firestore_v1.types import document
from google.cloud.firestore_v1.types import firestore
from google.cloud.firestore_v1.types import write
from google.protobuf.timestamp_pb2 import Timestamp
from tests.unit.v1 import conformance_tests
    from google.cloud.firestore_v1 import Client
    from google.cloud.firestore_v1.client import DEFAULT_DATABASE
    from google.cloud.firestore_v1 import Client
    from google.cloud.firestore_v1 import DocumentSnapshot
    from google.cloud.firestore_v1 import Watch
    from google.cloud.firestore_v1 import ArrayRemove
    from google.cloud.firestore_v1 import ArrayUnion
    from google.cloud.firestore_v1 import DELETE_FIELD
    from google.cloud.firestore_v1 import SERVER_TIMESTAMP
    from google.cloud.firestore_v1 import _helpers
    from google.cloud.firestore_v1 import Client
        from google.cloud.firestore_v1.types import query
    from google.auth.credentials import Credentials
    from google.cloud.firestore_v1 import Client
    from google.cloud.firestore_v1 import Query
    from google.cloud.firestore_v1 import DocumentReference
    from google.cloud.firestore_v1 import DocumentSnapshot

    def __init__(self, rpc, on_snapshot):
        self._rpc = rpc
        self.on_snapshot = on_snapshot

    def start(self):
        self.started = True

    def stop(self):
        self.stopped = True
        self.is_active = False


class DummyCollection(object):
    def __init__(self, client, parent=None):
        self._client = client
        self._parent = parent

    def _parent_info(self):
        return "{}/documents".format(self._client._database_string), None


class DummyQuery(object):  # pragma: NO COVER
    def __init__(self, parent):
        self._parent = parent
        self._comparator = lambda x, y: 1

    @property
    def _client(self):
        return self._parent._client


    def _to_protobuf(self):